Fix exception when drawAttention is called too early
// FREEBIE
This commit is contained in:
parent
28c82531d3
commit
f0539fda52
1 changed files with 7 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue