From ac18fb9043ed125334d35f68b2caefa72f21ff90 Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Thu, 26 Mar 2020 03:14:03 -0600 Subject: [PATCH] resolves #117 fix order of statements in relativize helper to avoid dropping fragment --- src/helpers/relativize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/relativize.js b/src/helpers/relativize.js index c96a701..6fdfb45 100644 --- a/src/helpers/relativize.js +++ b/src/helpers/relativize.js @@ -11,8 +11,8 @@ module.exports = (to, from, ctx) => { let hash = '' const hashIdx = to.indexOf('#') if (~hashIdx) { - to = to.substr(0, hashIdx) hash = to.substr(hashIdx) + to = to.substr(0, hashIdx) } return to === from ? hash || (isDir(to) ? './' : path.basename(to)) -- 2.11.0