Skip to content

Commit

Permalink
fix: max items settings correction (lukasoppermann#862)
Browse files Browse the repository at this point in the history
  • Loading branch information
norbitrial authored Feb 10, 2022
1 parent 6894f47 commit 6b65527
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/html5sortable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ export default function sortable (sortableElements, options: configuration|objec
return
}
const options = data(sortableElement, 'opts')
if (parseInt(options.maxItems) && filter(sortableElement.children, data(sortableElement, 'items')).length > parseInt(options.maxItems) && dragging.parentElement !== sortableElement) {
if (parseInt(options.maxItems) && filter(sortableElement.children, data(sortableElement, 'items')).length >= parseInt(options.maxItems) && dragging.parentElement !== sortableElement) {
return
}
e.preventDefault()
Expand Down

0 comments on commit 6b65527

Please sign in to comment.