From d760f46d9d43819861ea91caec5c225e46d8d01c Mon Sep 17 00:00:00 2001 From: Konstantin Schaper Date: Mon, 27 Nov 2023 09:25:02 +0100 Subject: [PATCH] Fix e2e tests breaking because of modern javascript api usage --- scm-ui/ui-webapp/src/search/search-box/SearchBox.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scm-ui/ui-webapp/src/search/search-box/SearchBox.tsx b/scm-ui/ui-webapp/src/search/search-box/SearchBox.tsx index 2b1fe1b277..5c0e7a5b90 100644 --- a/scm-ui/ui-webapp/src/search/search-box/SearchBox.tsx +++ b/scm-ui/ui-webapp/src/search/search-box/SearchBox.tsx @@ -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; }), [] );