Skip to content

Commit

Permalink
fix: stricter check for browser environment
Browse files Browse the repository at this point in the history
  • Loading branch information
fczbkk committed May 20, 2016
1 parent b364aeb commit 7725a1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Expand Up @@ -9,7 +9,9 @@ import polyfill from './array-reduce-polyfill';
*/
function isOldPrototype () {
// do not even try outside browser
if (!window) {return false;}
if (typeof window === 'undefined') {
return false;
}

const prototype_version = getNestedProperty(window, 'Prototype.Version');

Expand Down

0 comments on commit 7725a1f

Please sign in to comment.