mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Update Util.js
This commit is contained in:
+4
-2
@@ -61,8 +61,10 @@ module.exports = class Util {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static removeFromArray(arr, value) {
|
static removeFromArray(arr, value) {
|
||||||
const index = arr.indexOf(value);
|
while (arr.indexOf(value) > -1) {
|
||||||
if (index > -1) return arr.splice(index, 1);
|
const index = arr.indexOf(value);
|
||||||
|
arr = arr.splice(index, 1);
|
||||||
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user