Browse Source

Stagpopup - hook bool/str fix

Vijayakrishnan 2 years ago
parent
commit
d63134c095
1 changed files with 4 additions and 4 deletions
  1. 4 4
      js-dev/stag-popup.js

+ 4 - 4
js-dev/stag-popup.js

@@ -48,12 +48,12 @@ function closeStagPopup(_noEvent = false) {
     else {
         if(popup.is('[update-parent]') && !_noEvent) {
             let hook = popup.attr('update-parent');
-            if(!!$.trim(hook)) {
+            if(!!$.trim(hook) && $.trim(hook) !== 'true') {
                 let hooks = hook.split(',');
                 for (let i = 0; i < hooks.length; i++) {
-                    hooks[i] = $.trim(hooks);
-                    if(hasMCHook(hooks)) {
-                        runMCHook(hooks);
+                    hooks[i] = $.trim(hooks[i]);
+                    if(hasMCHook(hooks[i])) {
+                        runMCHook(hooks[i]);
                     }
                 }
             }