Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Feb 16, 2024
1 parent 06a2636 commit b7838fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
}
Expand Down

0 comments on commit b7838fb

Please sign in to comment.