From d58a868f4ac0c0804ca04ddef5b010dbcec54781 Mon Sep 17 00:00:00 2001 From: cchintoi Date: Fri, 8 Mar 2024 12:39:43 +0200 Subject: [PATCH] fix for...of return issue --- src/gmail.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gmail.js b/src/gmail.js index 68a7f019..446f6059 100644 --- a/src/gmail.js +++ b/src/gmail.js @@ -2389,7 +2389,7 @@ var Gmail = function(localJQuery) { // loop through applicable types var types = type ? [ type ] : [ "before", "on", "after", "dom" ]; for (let type of types) { - if(typeof api.tracker.watchdog[type] !== "object") return true; // no callbacks for this type + if(typeof api.tracker.watchdog[type] !== "object") continue; // no callbacks for this type // if action specified, remove any callbacks for this action, otherwise remove all callbacks for all actions if(action) { @@ -2767,7 +2767,7 @@ var Gmail = function(localJQuery) { for (let className of classes) { var observers = dom_observer_map[className]; if (!observers) { - return; + continue; } for (var observer of observers) { @@ -2779,7 +2779,7 @@ var Gmail = function(localJQuery) { // if a config id specified for this observer, ensure it matches for this element if(config.selector && !element.is(config.selector)) { - return; + break; } // check for any defined sub_selector match - if not found, then this is not a match for this observer