PR comment.

This commit is contained in:
mike12345567 2024-08-15 16:58:17 +01:00
parent 15fb54e841
commit 21cc83daf4
1 changed files with 6 additions and 5 deletions

View File

@ -159,11 +159,12 @@ export class FlagSet<V extends Flag<any>, T extends { [key: string]: V }> {
specificallySetFalse.add(feature)
}
// check it's a known flag, confirm its boolean
if (
this.isFlagName(feature) &&
typeof flagValues[feature] !== "boolean"
) {
// ignore unknown flags
if (this.isFlagName(feature)) {
continue
}
if (typeof flagValues[feature] !== "boolean") {
throw new Error(`Feature: ${feature} is not a boolean`)
}