Use more chaining to simplify code
Merge pull request #266 from sja/patch-1

chore(popover): use more chaining to simplify code