Skip to content

Commit

Permalink
fix(core): Correctly compare falsy customField values in OrderLines
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Mar 23, 2021
1 parent 51fc481 commit 265781c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ export class OrderModifier {
for (const def of customFieldDefs) {
const key = def.name;
const existingValue = existingCustomFields?.[key];
if (existingValue) {
if (existingValue !== undefined) {
const valuesMatch =
JSON.stringify(inputCustomFields?.[key]) === JSON.stringify(existingValue);
const undefinedMatchesNull = existingValue === null && inputCustomFields?.[key] === undefined;
Expand Down

0 comments on commit 265781c

Please sign in to comment.