Skip to content

Commit

Permalink
small insert optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Aug 22, 2020
1 parent 3cdcd3b commit 480d7fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default class MemServerModel {
this.attributes.push(this.primaryKey);
}

if (!(this.primaryKey in options)) {
if (!options.hasOwnProperty(this.primaryKey)) {
options[this.primaryKey] = this.primaryKey === "id" ? incrementId(this.DB, this) : generateUUID();
}

Expand Down

0 comments on commit 480d7fe

Please sign in to comment.