diff options
Diffstat (limited to 'assets/js/src')
-rw-r--r-- | assets/js/src/Popover.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/assets/js/src/Popover.js b/assets/js/src/Popover.js index b978c087..e5bc1c88 100644 --- a/assets/js/src/Popover.js +++ b/assets/js/src/Popover.js @@ -21,11 +21,14 @@ Popover.prototype.open = function(link) { }; Popover.prototype.close = function(e) { - if (e) { - e.preventDefault(); - } + if (this.isOpen()) { + + if (e) { + e.preventDefault(); + } - $('#popover-container').remove(); + $('#popover-container').remove(); + } }; Popover.prototype.onClick = function(e) { |