Skip to content

Commit b72e3e7

Browse files
committed
Fix build
1 parent 0a029a4 commit b72e3e7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/babel-plugin-component-annotate/src/experimental.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ function processJSX(context: JSXProcessingContext, jsxNode: Babel.NodePath): voi
283283
// NOTE: I don't know of a case where `openingElement` would have more than one item,
284284
// but it's safer to always iterate
285285
const paths = jsxNode.get("openingElement");
286-
const openingElements: Babel.NodePath<Babel.types.JSXOpeningElement>[] = Array.isArray(paths)
287-
? paths
288-
: [paths];
286+
const openingElements = (
287+
Array.isArray(paths) ? paths : [paths]
288+
) as Babel.NodePath<Babel.types.JSXOpeningElement>[];
289289

290290
const hasInjectedAttributes = openingElements.reduce(
291291
(prev, openingElement) =>

0 commit comments

Comments
 (0)