diff --git a/index.js b/index.js index 7f87890..2ee067d 100644 --- a/index.js +++ b/index.js @@ -94,6 +94,9 @@ class Yoke extends EventEmitter { for (let i = 0; i < size; i++) { const provider = url.parse(decodeURIComponent(children[i])); const queryObj = qs.parse(provider.query); + if (!queryObj.version && queryObj['default.version']) { + queryObj.version = queryObj['default.version'] + } if ( queryObj.version === depVal.version && queryObj.group === depVal.group && diff --git a/libs/service.js b/libs/service.js index 2791658..3425f2a 100644 --- a/libs/service.js +++ b/libs/service.js @@ -41,12 +41,12 @@ class Service { if (this.mdsig[method]) { args = this.mdsig[method](...args); } - return new Promise((resolve, reject) => this.execute(method, args, resolve, reject)); + return new Promise((resolve, reject) => this._execute(method, args, resolve, reject)); }; } } - execute(method, args, resolve, reject) { + _execute(method, args, resolve, reject) { const attach = Object.assign({}, this.encodeParam, { _method: method, _args: args