Skip to content

Commit 5c40894

Browse files
kinkoazccchintoi
and
cchintoi
authored
fix for...of return issue (KartikTalwar#782)
Co-authored-by: cchintoi <[email protected]>
1 parent 4d2a16d commit 5c40894

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/gmail.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2389,7 +2389,7 @@ var Gmail = function(localJQuery) {
23892389
// loop through applicable types
23902390
var types = type ? [ type ] : [ "before", "on", "after", "dom" ];
23912391
for (let type of types) {
2392-
if(typeof api.tracker.watchdog[type] !== "object") return true; // no callbacks for this type
2392+
if(typeof api.tracker.watchdog[type] !== "object") continue; // no callbacks for this type
23932393

23942394
// if action specified, remove any callbacks for this action, otherwise remove all callbacks for all actions
23952395
if(action) {
@@ -2767,7 +2767,7 @@ var Gmail = function(localJQuery) {
27672767
for (let className of classes) {
27682768
var observers = dom_observer_map[className];
27692769
if (!observers) {
2770-
return;
2770+
continue;
27712771
}
27722772

27732773
for (var observer of observers) {
@@ -2779,7 +2779,7 @@ var Gmail = function(localJQuery) {
27792779

27802780
// if a config id specified for this observer, ensure it matches for this element
27812781
if(config.selector && !element.is(config.selector)) {
2782-
return;
2782+
break;
27832783
}
27842784

27852785
// check for any defined sub_selector match - if not found, then this is not a match for this observer

0 commit comments

Comments
 (0)