@veritree/ui 0.24.0 → 0.24.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.
@@ -208,7 +208,9 @@ export const floatingUiItemMixin = {
208
208
  }
209
209
 
210
210
  // focus new item
211
- this.items[newSelectedIndex].focus();
211
+ if (this.items[newSelectedIndex]) {
212
+ this.items[newSelectedIndex].focus();
213
+ }
212
214
  },
213
215
 
214
216
  getItemSelectedIndex() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritree/ui",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
4
4
  "description": "veritree ui library",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -110,7 +110,9 @@ export default {
110
110
  }
111
111
 
112
112
  // select new item
113
- this.items[newSelectedIndex].select();
113
+ if (this.items[newSelectedIndex]) {
114
+ this.items[newSelectedIndex].select();
115
+ }
114
116
  },
115
117
 
116
118
  unselectItem() {