Skip to content

Commit f3bcdf2

Browse files
committed
fix: #877
1 parent 5633af4 commit f3bcdf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/editors/select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export class SelectEditor extends AbstractEditor {
99
const haveToUseDefaultValue = !!this.jsoneditor.options.use_default_values || typeof this.schema.default !== 'undefined'
1010

1111
if (
12-
!this.enum_values.includes(sanitized) ||
12+
(this.enum_options.length > 0 && !this.enum_values.includes(sanitized)) ||
1313
(initial && !this.isRequired() && !haveToUseDefaultValue)
1414
) {
1515
sanitized = this.enum_values[0]

0 commit comments

Comments
 (0)