From 22d1c1bdde5f9a0fb0fe7593980f3a2a4aaa95db Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Tue, 27 Mar 2018 00:59:59 -0600 Subject: [PATCH] update relativize to return to if from is falsy --- 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 f9788c0..090ee24 100644 --- a/src/helpers/relativize.js +++ b/src/helpers/relativize.js @@ -4,7 +4,7 @@ const { posix: path } = require('path') // TODO memoize module.exports = (from, to) => { - if (to.charAt() === '#') return to + if (!from || to.charAt() === '#') return to let hash = '' const hashIdx = to.indexOf('#') if (~hashIdx) { -- 2.11.0