Skip to content

Commit

Permalink
null check added for enumFromString function
Browse files Browse the repository at this point in the history
  • Loading branch information
harunalpak committed Dec 14, 2022
1 parent 0210e66 commit 91e4dc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/Util.ts
Expand Up @@ -69,7 +69,7 @@ export function shuffleArray<T>(array: T[]): void {

/** @internal */
export function enumFromString<T>(enumType: any, value: string): T {
return enumType[value.toUpperCase()];
return enumType[value ? value.toUpperCase() : value];
}

/** @internal */
Expand Down

0 comments on commit 91e4dc1

Please sign in to comment.