fix: Set falsy values as default to schema fields (#5868)
This commit is contained in:
committed by
Diamond Lewis
parent
218c3499f9
commit
6080dbc4f9
@@ -338,7 +338,8 @@ RestWrite.prototype.setRequiredFieldsIfNeeded = function() {
|
||||
if (
|
||||
setDefault &&
|
||||
schema.fields[fieldName] &&
|
||||
schema.fields[fieldName].defaultValue &&
|
||||
schema.fields[fieldName].defaultValue !== null &&
|
||||
schema.fields[fieldName].defaultValue !== undefined &&
|
||||
(this.data[fieldName] === undefined ||
|
||||
(typeof this.data[fieldName] === 'object' &&
|
||||
this.data[fieldName].__op === 'Delete'))
|
||||
|
||||
Reference in New Issue
Block a user