Skip to content

Commit 448af93

Browse files
committed
Preventing accidenal observer overrides
1 parent 34df961 commit 448af93

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/gmail.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,11 @@ var Gmail = function() {
794794

795795

796796
api.observe.on = function(action, callback) {
797-
if(typeof api.tracker.watchdog != "object" || typeof api.tracker.shortcut_watchdog != "object") {
797+
if(typeof api.tracker.watchdog != "object") {
798798
api.tracker.watchdog = {};
799+
}
800+
801+
if(typeof api.tracker.shortcut_watchdog != "object") {
799802
api.tracker.shortcut_watchdog = {};
800803
}
801804

0 commit comments

Comments
 (0)