diff --git a/page.js b/page.js index ea52efb8..051654f9 100644 --- a/page.js +++ b/page.js @@ -710,8 +710,8 @@ */ function getBase() { if(!!base) return base; - var loc = pageWindow.location; - return (hashbang && loc.protocol === 'file:') ? loc.pathname : base; + var loc = hasWindow && pageWindow.location; + return (hasWindow && hashbang && loc.protocol === 'file:') ? loc.pathname : base; } page.sameOrigin = sameOrigin;