From cb464c630111c0bf40927af02a96f96f82d474d5 Mon Sep 17 00:00:00 2001 From: Daniel Gasienica Date: Mon, 5 Mar 2018 17:59:29 -0500 Subject: [PATCH] Ensure `isFocused` always returns boolean --- js/focus_listener.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/focus_listener.js b/js/focus_listener.js index 08434f1cc..04d4d33e3 100644 --- a/js/focus_listener.js +++ b/js/focus_listener.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - var windowFocused; + var windowFocused = false; window.addEventListener('blur', function() { windowFocused = false; }); @@ -12,5 +12,4 @@ window.isFocused = function() { return windowFocused; }; - })();