Strip trailing / in api url

This commit is contained in:
Roman Hotsiy 2015-11-29 17:14:18 +02:00
parent 3b5cd1068b
commit 5446c573c5

View File

@ -39,6 +39,9 @@ export default class SchemaManager {
/* calculate common used values */ /* calculate common used values */
init() { init() {
this.apiUrl = this._schema.schemes[0] + '://' + this._schema.host + this._schema.basePath; this.apiUrl = this._schema.schemes[0] + '://' + this._schema.host + this._schema.basePath;
if (this.apiUrl.endsWith('/')) {
this.apiUrl = this.apiUrl.substr(0, this.apiUrl.length - 1);
}
} }
get schema() { get schema() {