Skip to content

Commit 04be69f

Browse files
committed
Added an additional check for array accessibility
1 parent db6fadb commit 04be69f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ function convertPatternProperties(schema) {
150150
}
151151

152152
function convertExamples(schema) {
153-
if (schema['examples']) {
153+
if (schema['examples'] && Array.isArray(schema['examples'])) {
154154
schema['example'] = schema['examples'][0];
155155
delete schema['examples'];
156156
}

0 commit comments

Comments
 (0)