We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e60742e commit 6e74b73Copy full SHA for 6e74b73
src/lib/utils.tsx
@@ -26,10 +26,11 @@ export const sumNumericArray = (arr: number[]) =>
26
27
export const removeValueFromArray = (value: any, array: any[]): any[] => {
28
const index = array.indexOf(value);
29
+ const newArray = [...array];
30
if (index > -1) {
- array.splice(index, 1);
31
+ newArray.splice(index, 1);
32
}
- return array;
33
+ return newArray;
34
};
35
36
export const isValueInArray = (value: any, array: any[]): boolean => {
0 commit comments