X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Futils%2Farray.js;h=d02552c10ec471a8cffe9e537f9736b0392014b9;hp=4d44db02d324512a786ecea6eb5e4b875eebb836;hb=6e0f28425075e6d2d79cab6d30bca6ce6d55f19d;hpb=b70a32d4e9a6446164e06ba07a586bb157aaf928 diff --git a/client/src/utils/array.js b/client/src/utils/array.js index 4d44db02..d02552c1 100644 --- a/client/src/utils/array.js +++ b/client/src/utils/array.js @@ -4,7 +4,7 @@ export const ArrayFun = { const index = arr.findIndex(rfun); if (index >= 0) { arr.splice(index, 1); - if (all) { + if (!!all) { // Reverse loop because of the splice below for (let i = arr.length - 1; i >= index; i--) { if (rfun(arr[i])) arr.splice(i, 1);