diff --git a/js/cast.js b/js/cast.js index e813f2d..f693a92 100644 --- a/js/cast.js +++ b/js/cast.js @@ -104,4 +104,6 @@ var castModule = (function () { }; }()); -window.addEventListener('load', castModule.init, false); +if (typeof window === 'object') { + window.addEventListener('load', castModule.init, false); +}