diff --git a/js/chromium.js b/js/chromium.js index 3f67a39f..369a059e 100644 --- a/js/chromium.js +++ b/js/chromium.js @@ -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(); + } } }