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
parent 774d7f5fb1
commit d760f46d9d

View File

@@ -75,8 +75,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;
}),
[]
);