File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/richtext-lexical/src Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
14
14
beforeChangeTraverseFields ,
15
15
beforeValidateTraverseFields ,
16
16
deepCopyObject ,
17
+ deepCopyObjectSimple ,
17
18
getDependencies ,
18
19
withNullableJSONSchemaType ,
19
20
} from 'payload'
@@ -124,13 +125,13 @@ export function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapte
124
125
isRoot,
125
126
unSanitizedEditorConfig : {
126
127
features,
127
- lexical : lexical ? lexical : defaultEditorConfig . lexical ,
128
+ lexical : lexical ? lexical : deepCopyObjectSimple ( defaultEditorConfig . lexical ) ,
128
129
} ,
129
130
} )
130
131
131
132
finalSanitizedEditorConfig = {
132
133
features : sanitizeServerFeatures ( resolvedFeatureMap ) ,
133
- lexical : lexical ? lexical : defaultEditorConfig . lexical ,
134
+ lexical : lexical ? lexical : deepCopyObjectSimple ( defaultEditorConfig . lexical ) ,
134
135
resolvedFeatureMap,
135
136
}
136
137
}
@@ -463,8 +464,8 @@ export function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapte
463
464
recurseNodeTree ( {
464
465
nodeIDMap : originalNodeWithLocalesIDMap ,
465
466
nodes :
466
- ( siblingDocWithLocales [ field . name ] as SerializedEditorState ) ?. root
467
- ?. children ?? [ ] ,
467
+ ( siblingDocWithLocales [ field . name ] as SerializedEditorState ) ?. root ?. children ??
468
+ [ ] ,
468
469
} )
469
470
}
470
471
You can’t perform that action at this time.
0 commit comments