diff --git a/packages/kit/src/utils.ts b/packages/kit/src/utils.ts index 4352d25ea5..7eeade52d6 100644 --- a/packages/kit/src/utils.ts +++ b/packages/kit/src/utils.ts @@ -13,7 +13,9 @@ export function filterInPlace (array: T[], predicate: (item: T, index: number for (let i = array.length; i--; i >= 0) { if (!predicate(array[i]!, i, array)) { const last = --array.length - if (i < last) { array[i] = array[last]! } + if (i < last) { + array[i] = array[last]! + } } } return array