Skip to content

Commit 6b452d3

Browse files
committed
fix(Expiry): check for null input
1 parent e12cc23 commit 6b452d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/typedefs/Expiry.ts

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export type Expiry =
3939
export function resolveExpiry(
4040
input: string
4141
): "N" | "10M" | "1H" | "1D" | "1W" | "2W" | "1M" | "6M" | "1Y" {
42+
if (!input) return null
4243
const initials = input
4344
.split(" ")
4445
.map(w => w[0])

0 commit comments

Comments
 (0)