Skip to content

Commit

Permalink
Fix override default conf
Browse files Browse the repository at this point in the history
  • Loading branch information
ruddenchaux committed Jul 25, 2018
1 parent 915f212 commit 6f7bd2d
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion dist/vuex-orm.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -6185,7 +6185,8 @@ var Model = /** @class */ (function (_super) {
}
else {
var _onModelconf = this._conf;
var _defaultConf = __assign$10({}, defaultConf.http, ModuleOptions.getDefaultHttpConfig());
var _defaultConf = Object.assign({}, defaultConf);
_defaultConf.http = __assign$10({}, defaultConf.http, ModuleOptions.getDefaultHttpConfig());
this.replaceAllUrlSelf(_defaultConf);
// instance default conf
this._conf = new ModelConf(_defaultConf);
Expand Down
3 changes: 2 additions & 1 deletion dist/vuex-orm.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6183,7 +6183,8 @@ var Model = /** @class */ (function (_super) {
}
else {
var _onModelconf = this._conf;
var _defaultConf = __assign$10({}, defaultConf.http, ModuleOptions.getDefaultHttpConfig());
var _defaultConf = Object.assign({}, defaultConf);
_defaultConf.http = __assign$10({}, defaultConf.http, ModuleOptions.getDefaultHttpConfig());
this.replaceAllUrlSelf(_defaultConf);
// instance default conf
this._conf = new ModelConf(_defaultConf);
Expand Down
3 changes: 2 additions & 1 deletion dist/vuex-orm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6189,7 +6189,8 @@
}
else {
var _onModelconf = this._conf;
var _defaultConf = __assign$10({}, defaultConf.http, ModuleOptions.getDefaultHttpConfig());
var _defaultConf = Object.assign({}, defaultConf);
_defaultConf.http = __assign$10({}, defaultConf.http, ModuleOptions.getDefaultHttpConfig());
this.replaceAllUrlSelf(_defaultConf);
// instance default conf
this._conf = new ModelConf(_defaultConf);
Expand Down
2 changes: 1 addition & 1 deletion dist/vuex-orm.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lib/model/Model.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/model/Model.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/model/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export default class Model extends BaseModel {
}
else {
const _onModelconf = this._conf as JsonModelConf
const _defaultConf = { ...defaultConf.http as any, ...ModuleOptions.getDefaultHttpConfig() }
let _defaultConf = Object.assign({}, defaultConf)
_defaultConf.http = { ...defaultConf.http as any, ...ModuleOptions.getDefaultHttpConfig() }

this.replaceAllUrlSelf(_defaultConf as JsonModelConf)
// instance default conf
Expand Down

0 comments on commit 6f7bd2d

Please sign in to comment.