Skip to content

Commit

Permalink
add popperElement guard (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerturdenpants authored Nov 14, 2019
1 parent 207a375 commit 21745a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/components/attach-popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ export default Component.extend({
// If cursor is not on the attachment or target, hide the popover
if (!target.contains(event.target)
&& !(this.get('isOffset') && this._isCursorBetweenTargetAndAttachment(event))
&& !this._popperElement.contains(event.target)) {
&& (this._popperElement && !this._popperElement.contains(event.target))) {
// Remove this listener before hiding the attachment
delete this._hideListenersOnDocumentByEvent.mousemove;
document.removeEventListener('mousemove', this._hideIfMouseOutsideTargetOrAttachment, this.get('useCapture'));
Expand Down

0 comments on commit 21745a7

Please sign in to comment.