We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bce26e commit c57dea4Copy full SHA for c57dea4
src/common/config/configUtils.ts
@@ -129,10 +129,10 @@ export function parseBoolean(val: unknown): unknown {
129
/** Allow overriding only to the allowed value */
130
export function oneWayOverride<T>(allowedValue: T): CustomOverrideLogic {
131
return (oldValue, newValue) => {
132
- // Only allow override if setting to true from false
+ // Only allow override if setting to allowed value
133
if (newValue === allowedValue) {
134
return newValue;
135
}
136
- throw new Error(`Can only set to ${allowedValue ? "true" : "false"}`);
+ throw new Error(`Can only set to ${String(allowedValue)}`);
137
};
138
0 commit comments