diff --git a/require-browser.js b/require-browser.js index 1e5c7a1..39d88ae 100644 --- a/require-browser.js +++ b/require-browser.js @@ -166,7 +166,11 @@ const { install, installAll, require, requireBrowser, _getInstalledData } = (fun }); } - const absolute = (rel, base = window.location.href) => { + const getLocation = () => { + return window.location.href.substring(0, window.location.href.length - window.location.hash.length); + } + + const absolute = (rel, base = getLocation()) => { if(rel.includes("://")) { return rel; }