Skip to content

Commit 6a0ec69

Browse files
committed
fix: add null check for validator schema in code editor
1 parent 258225c commit 6a0ec69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Common/CodeEditor/utils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export const getValidationSchema = ({
161161
validatorSchema,
162162
schemaURI,
163163
}: Pick<CodeEditorProps, 'schemaURI' | 'validatorSchema' | 'mode'>): Extension[] => {
164-
if (!Object.keys(validatorSchema).length) {
164+
if (!Object.keys(validatorSchema || {}).length) {
165165
return []
166166
}
167167

0 commit comments

Comments
 (0)