Skip to content

Commit c57dea4

Browse files
committed
chore: cleanup helper
1 parent 3bce26e commit c57dea4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/config/configUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ export function parseBoolean(val: unknown): unknown {
129129
/** Allow overriding only to the allowed value */
130130
export function oneWayOverride<T>(allowedValue: T): CustomOverrideLogic {
131131
return (oldValue, newValue) => {
132-
// Only allow override if setting to true from false
132+
// Only allow override if setting to allowed value
133133
if (newValue === allowedValue) {
134134
return newValue;
135135
}
136-
throw new Error(`Can only set to ${allowedValue ? "true" : "false"}`);
136+
throw new Error(`Can only set to ${String(allowedValue)}`);
137137
};
138138
}

0 commit comments

Comments
 (0)