@json-editor/json-editor 2.15.0 → 2.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@
3
3
  * * @name JSON Editor
4
4
  * * @description JSON Schema Based Editor
5
5
  * * This library is the continuation of jdorn's great work (see also https://github.com/jdorn/json-editor/issues/800)
6
- * * @version "2.15.0"
6
+ * * @version "2.15.1"
7
7
  * * @author Jeremy Dorn
8
8
  * * @see https://github.com/jdorn/json-editor/
9
9
  * * @see https://github.com/json-editor/json-editor
@@ -3,7 +3,7 @@
3
3
  * * @name JSON Editor
4
4
  * * @description JSON Schema Based Editor
5
5
  * * This library is the continuation of jdorn's great work (see also https://github.com/jdorn/json-editor/issues/800)
6
- * * @version "2.15.0"
6
+ * * @version "2.15.1"
7
7
  * * @author Jeremy Dorn
8
8
  * * @see https://github.com/jdorn/json-editor/
9
9
  * * @see https://github.com/json-editor/json-editor
@@ -9381,10 +9381,13 @@ var SelectEditor = /*#__PURE__*/function (_AbstractEditor) {
9381
9381
  sanitized = this.enum_values[0];
9382
9382
  }
9383
9383
  if (this.value === sanitized) return;
9384
- if (inEnum && this.hasPlaceholderOption) {
9385
- this.input.value = this.enum_options[this.enum_values.indexOf(sanitized)];
9386
- } else {
9384
+ var selectedIndex = this.enum_values.indexOf(sanitized);
9385
+ if (inEnum && selectedIndex !== -1) {
9386
+ this.input.value = this.enum_options[selectedIndex];
9387
+ } else if (this.hasPlaceholderOption) {
9387
9388
  this.input.value = '_placeholder_';
9389
+ } else {
9390
+ this.input.value = sanitized;
9388
9391
  }
9389
9392
  this.value = sanitized;
9390
9393
  if (!initial) {