Fixing an issue where old feature flags would cause issues, all feature flags are expected to be known, this allows unknown feature flags to just be ignored.
This commit is contained in:
parent
41f249cca6
commit
5c63439c8d
|
@ -159,11 +159,11 @@ export class FlagSet<V extends Flag<any>, T extends { [key: string]: V }> {
|
||||||
specificallySetFalse.add(feature)
|
specificallySetFalse.add(feature)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.isFlagName(feature)) {
|
// check it's a known flag, confirm its boolean
|
||||||
throw new Error(`Feature: ${feature} is not an allowed option`)
|
if (
|
||||||
}
|
this.isFlagName(feature) &&
|
||||||
|
typeof flagValues[feature] !== "boolean"
|
||||||
if (typeof flagValues[feature] !== "boolean") {
|
) {
|
||||||
throw new Error(`Feature: ${feature} is not a boolean`)
|
throw new Error(`Feature: ${feature} is not a boolean`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue