From b7838fb862438d24f05937a2209775e45908f7f8 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 16 Feb 2024 12:33:31 +0100 Subject: [PATCH] fix --- lib/utils/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/utils/index.ts b/lib/utils/index.ts index d2d002d..57eb954 100644 --- a/lib/utils/index.ts +++ b/lib/utils/index.ts @@ -55,6 +55,9 @@ export const getDescriptor = ( switch (type) { case 'ArrayExpression': return property.value.elements.map((t) => { + if (t === null) { + throw new Error(`Unexpected descriptor element: ${t}`) + } if (!['StringLiteral', 'Literal'].includes(t.type)) { throw new Error(`Unexpected descriptor element: ${t.type}`) }