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 8aee608 commit 39a3e8bCopy full SHA for 39a3e8b
src/interfaces.ts
@@ -151,7 +151,7 @@ export enum FormatEnum {
151
// enums are a little sticky to work with in conjunction with serialization.
152
export function getFormatFromString(str: string | null): FormatEnum {
153
// default to SERVER. Should always be set, but the ConfigurationStore allows null.
154
- return Object.values(FormatEnum).find((val) => val === str) ?? FormatEnum.SERVER;
+ return FormatEnum[str as keyof typeof FormatEnum] ?? FormatEnum.SERVER;
155
}
156
157
export type BasePrecomputedFlag = {
0 commit comments