|
@ -137,7 +137,7 @@ export default class Now extends EventEmitter { |
|
|
|
|
|
|
|
|
function toRelative (path, base) { |
|
|
function toRelative (path, base) { |
|
|
const fullBase = /\/$/.test(base) ? base + '/' : 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); |
|
|
if (relative.startsWith('/')) return relative.substr(1); |
|
|
return relative; |
|
|
return relative; |
|
|
} |
|
|
} |
|
|