From 6e06eb605c6aeb8dff0d06022d9b8e9da3c7cf26 Mon Sep 17 00:00:00 2001 From: CMEONE Date: Sat, 5 Jun 2021 09:05:41 -0700 Subject: [PATCH] Fix path bug --- require-browser.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; }