Browse Source

Ensure no beginning slash in synced file paths

master
Tony Kovanen 9 years ago
parent
commit
d65e29c67d
  1. 4
      lib/index.js

4
lib/index.js

@ -137,7 +137,9 @@ export default class Now extends EventEmitter {
function toRelative (path, base) {
const fullBase = /\/$/.test(base) ? base + '/' : base;
return path.substr(fullBase.length);
const relative path.substr(fullBase.length);
if (relative.startsWith('/')) return relative.substr(1);
return relative;
}
function responseError (res) {

Loading…
Cancel
Save