goodteditor-ui 1.0.67 → 1.0.69

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goodteditor-ui",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
4
4
  "main": "index.js",
5
5
  "homepage": "https://goodt-ui.netlify.app/",
6
6
  "scripts": {
@@ -349,8 +349,10 @@ export default {
349
349
  const { options, isValueOfOption } = this;
350
350
  const models = [model].flat();
351
351
  const optionsSelected = options.filter((option) => models.some((modelItem) => isValueOfOption(option, modelItem)));
352
- this.dataListCursorIndex = this.getOptionIndex(optionsSelected[0]);
353
- this.optionsSelected = this.multiple ? optionsSelected : [optionsSelected[0]];
352
+ if (optionsSelected.length > 0) {
353
+ this.dataListCursorIndex = this.getOptionIndex(optionsSelected[0]);
354
+ this.optionsSelected = this.multiple ? optionsSelected : [optionsSelected[0]];
355
+ }
354
356
  },
355
357
  exportModel() {
356
358
  const model = this.optionsSelected.map((option) =>