Skip to content

Commit

Permalink
fix(BitField): ensure missing returns an array of strings (#5795)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceEEC committed Jun 10, 2021
1 parent a1f763e commit 68f7aeb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/util/BitField.js
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 68f7aeb

Please sign in to comment.