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 9b958f7517..e7d82880b2 100644 --- a/scm-ui/ui-webapp/src/search/search-box/SearchBox.tsx +++ b/scm-ui/ui-webapp/src/search/search-box/SearchBox.tsx @@ -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; }), [] );