From 8199bf8377a110168a23dab1b8b074b722d18ffe Mon Sep 17 00:00:00 2001 From: Chia-liang Kao Date: Tue, 23 Oct 2012 15:21:05 +0800 Subject: [PATCH] Do not assume window object exists --- src/static/js/contentcollector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/contentcollector.js b/src/static/js/contentcollector.js index 6a75de43a..dd4fd1e54 100644 --- a/src/static/js/contentcollector.js +++ b/src/static/js/contentcollector.js @@ -311,7 +311,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class ['insertorder', 'first'] ].concat( _.map(state.lineAttributes,function(value,key){ - if (window.console) console.log([key, value]) + if (typeof(window)!= 'undefined' && window.console) console.log([key, value]) return [key, value]; }) );