Fix exception when drawAttention is called too early

// FREEBIE
pull/749/head
lilia 9 years ago
parent 28c82531d3
commit f0539fda52

@ -135,8 +135,10 @@
console.log('draw attention'); console.log('draw attention');
if (chrome.app.window) { if (chrome.app.window) {
var w = chrome.app.window.get(window_id); var w = chrome.app.window.get(window_id);
w.clearAttention(); if (w) {
w.drawAttention(); w.clearAttention();
w.drawAttention();
}
} }
}, },
@ -144,7 +146,9 @@
console.log('clear attention'); console.log('clear attention');
if (chrome.app.window) { if (chrome.app.window) {
var w = chrome.app.window.get(window_id); var w = chrome.app.window.get(window_id);
w.clearAttention(); if (w) {
w.clearAttention();
}
} }
} }

Loading…
Cancel
Save