Fix e2e tests breaking because of modern javascript api usage

This commit is contained in:
Konstantin Schaper
2023-11-27 09:25:02 +01:00
committed by René Pfeuffer
parent 0d80599801
commit 8e4d752e31

View File

@@ -77,8 +77,9 @@ const SearchBox = React.forwardRef<
if (indexToInsert === -1) {
indexToInsert = 0;
}
// @ts-ignore toSpliced is part of modern browser api
return prev.toSpliced(indexToInsert, 0, ref);
const result = prev.slice();
result.splice(indexToInsert, 0, ref);
return result;
}),
[]
);