Skip to content

Commit

Permalink
avniproject/avni-client#1142 - fixed the keys check
Browse files Browse the repository at this point in the history
  • Loading branch information
petmongrels committed Oct 30, 2023
1 parent 7dde9e9 commit a33373f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/framework/RealmProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class RealmProxy {
const emptyMandatoryProperties = [];

const saveObjectKeys = Object.keys(underlyingObject);
if (updateMode === "never" || updateMode === false || _.intersection(mandatoryObjectSchemaProperties, saveObjectKeys.length > 0)) {
if (updateMode === "never" || updateMode === false || _.intersection(mandatoryObjectSchemaProperties, saveObjectKeys).length > 0) {
saveObjectKeys.forEach((x) => {
const propertyValue = underlyingObject[x];
if (_.isNil(propertyValue) && _.some(mandatoryObjectSchemaProperties, (y) => y === x)) emptyMandatoryProperties.push(x.propertyName);
Expand Down

0 comments on commit a33373f

Please sign in to comment.