We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TypeError: items[0] is undefined
1 parent d2003aa commit a076250Copy full SHA for a076250
addon/src/modifiers/sortable-item.js
@@ -826,7 +826,7 @@ export default class SortableItemModifier extends Modifier {
826
*/
827
get transitionDuration() {
828
const items = this.sortableGroup.sortedItems.filter((x) => !x.isDragging && !x.isDropping);
829
- let el = items[0].element ?? this.element; // Fallback when only one element is present in list
+ let el = items[0]?.element ?? this.element; // Fallback when only one element is present in list
830
let rule = getComputedStyle(el).transitionDuration;
831
let match = rule.match(/([\d.]+)([ms]*)/);
832
0 commit comments