Skip to content

Commit

Permalink
avoid error when save() has no changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Oct 18, 2023
1 parent 73eeb26 commit 1208f41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ exports.initMigrationFramework = function initMigrationFramework(conn) {
modelName: this.constructor.modelName,
opName: 'save',
parameters: {
where: this.isNew ? null : this.$__delta()[0],
where: this.isNew ? null : (this.$__delta() || [])[0],
isNew: this.isNew,
changes: this.getChanges()
}
Expand Down

0 comments on commit 1208f41

Please sign in to comment.