fix
This commit is contained in:
parent
9ae7b92bbf
commit
3edc0403ba
|
@ -178,7 +178,7 @@ export default class CrudModel extends ModelProxy {
|
|||
}
|
||||
}
|
||||
|
||||
let changes = {deletes, updates, creates};
|
||||
const changes = {deletes, updates, creates};
|
||||
|
||||
for (let prop in changes) {
|
||||
if (changes[prop].length === 0)
|
||||
|
@ -198,8 +198,7 @@ export default class CrudModel extends ModelProxy {
|
|||
const changes = this.getChanges();
|
||||
if (!changes) return this.$q.resolve();
|
||||
|
||||
const creates = changes.creates;
|
||||
|
||||
const creates = changes.creates || [];
|
||||
let url = this.saveUrl ? this.saveUrl : `${this._url}/crud`;
|
||||
return this.$http.post(url, changes)
|
||||
.then(res => {
|
||||
|
|
Loading…
Reference in New Issue