Fix exception when drawAttention is called too early

// FREEBIE
This commit is contained in:
lilia 2016-03-10 11:00:53 -08:00
parent 28c82531d3
commit f0539fda52

View file

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