From b8f52bef62695fd620533f2d0028ce4855f274e7 Mon Sep 17 00:00:00 2001 From: Tony Kovanen Date: Wed, 2 Mar 2016 15:38:55 +0200 Subject: [PATCH] Fix `toRelative` --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index affe7c0..29f95d1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -137,7 +137,7 @@ export default class Now extends EventEmitter { function toRelative (path, base) { const fullBase = /\/$/.test(base) ? base + '/' : base; - const relative path.substr(fullBase.length); + const relative = path.substr(fullBase.length); if (relative.startsWith('/')) return relative.substr(1); return relative; }