From 7c919e01bcbc212a74df56fe81a3583a53cfbed5 Mon Sep 17 00:00:00 2001 From: Teranode Date: Thu, 1 Nov 2018 12:32:37 -0400 Subject: [PATCH] Fix hide event firing twice (#3898) The setTimeout fires after the modal already hides so it ends up firing twice which causes an error because the element is no longer there: ``` Uncaught TypeError: Cannot read property 'get' of null at Popup.triggerEvent (storm-min.js?v443:3732) at Popup.hide (storm-min.js?v443:3741) at storm-min.js?v443:3730 ``` Credit to @Teranode for the fix. --- modules/system/assets/ui/js/popup.js | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/system/assets/ui/js/popup.js b/modules/system/assets/ui/js/popup.js index 610834212..c5b433268 100644 --- a/modules/system/assets/ui/js/popup.js +++ b/modules/system/assets/ui/js/popup.js @@ -274,7 +274,6 @@ // Wait for animations to complete var self = this setTimeout(function() { self.setBackdrop(false) }, 250) - setTimeout(function() { self.hide() }, 500) } Popup.prototype.triggerEvent = function(eventName, params) {