diff --git a/lib/generator.js b/lib/generator.js index d5ede30..622dda7 100644 --- a/lib/generator.js +++ b/lib/generator.js @@ -18,7 +18,7 @@ module.exports = (function () { } function isBrowser () { - return typeof window == 'object'; + return typeof window == 'object' && typeof window.location !== 'undefined'; } function repeat (str, times) {