Skip to content

Commit

Permalink
deposit-ui: make sure we handle null/undefined for SchemaField
Browse files Browse the repository at this point in the history
  • Loading branch information
slint committed Dec 2, 2024
1 parent deb3571 commit e9c2704
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class SchemaField extends Field {
*/
serialize(deserialized, defaultLocale) {
const fieldValues = _get(deserialized, this.fieldpath, this.serializedDefault);
const serializedElements = fieldValues.map((value) => {
const serializedElements = fieldValues?.map((value) => {
let serializedElement = _pick(value, this.schemaKeys);
this.schemaKeys.forEach((key) => {
serializedElement = this.schema[key].serialize(
Expand Down

0 comments on commit e9c2704

Please sign in to comment.