Fix a crash when there's only 1 tile and it gets shrunk
This commit is contained in:
parent
42e4f6ce83
commit
6cd939db0c
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ const findLastIndex = <T,>(
|
|||
array: T[],
|
||||
predicate: (item: T) => boolean
|
||||
): number | null => {
|
||||
for (let i = array.length - 1; i > 0; i--) {
|
||||
for (let i = array.length - 1; i >= 0; i--) {
|
||||
if (predicate(array[i])) return i;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue