Skip to content

Commit

Permalink
Fix path bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CMEONE committed Jun 5, 2021
1 parent a5fb3e8 commit 6e06eb6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion require-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6e06eb6

Please sign in to comment.