From 7a90bafb40966a3f453b2f559e46afd97794d7aa Mon Sep 17 00:00:00 2001 From: wuyuanyi Date: Fri, 15 Jan 2016 16:51:44 +0000 Subject: [PATCH] fix issue #21 --- src/rest/base.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/rest/base.js b/src/rest/base.js index 1a99579..d12c59f 100644 --- a/src/rest/base.js +++ b/src/rest/base.js @@ -13,9 +13,14 @@ export class Base { this.name = stripSlashes(name); this.options = Object.assign({}, options); this.connection = options.connection; - this.base = `${options.base}/${this.name}`; - delete this.options.base; - + + if(options.base) { + this.base = `${options.base}/${this.name}`; + delete this.options.base; + } else { + this.base = this.name; + } + normalize(this); makeEmitting(this); }