|
|
@ -224,10 +224,10 @@ export default class Now extends EventEmitter { |
|
|
|
} |
|
|
|
|
|
|
|
function toRelative (path, base) { |
|
|
|
const fullBase = base.endsWith(SEP) ? base + SEP : base; |
|
|
|
const relative = path.substr(fullBase.length); |
|
|
|
if (relative.startsWith(SEP)) return relative.substr(1); |
|
|
|
return relative; |
|
|
|
const fullBase = base.endsWith(SEP) ? base : base + SEP; |
|
|
|
let relative = path.substr(fullBase.length); |
|
|
|
if (relative.startsWith(SEP)) relative = relative.substr(1); |
|
|
|
return relative.replace(/\\/g, '/'); |
|
|
|
} |
|
|
|
|
|
|
|
function responseError (res) { |
|
|
|