fix(BitField): ensure missing returns an array of strings (#5795)

This commit is contained in:
SpaceEEC
2021-06-10 18:05:17 +02:00
committed by GitHub
parent a1f763ee75
commit 68f7aebcaf

View File

@@ -52,8 +52,7 @@ class BitField {
* @returns {string[]}
*/
missing(bits, ...hasParams) {
if (!Array.isArray(bits)) bits = new this.constructor(bits).toArray(false);
return bits.filter(p => !this.has(p, ...hasParams));
return new this.constructor(bits).remove(this).toArray(...hasParams);
}
/**