diff --git a/src/transform.ts b/src/transform.ts index 265f1a87..bc7ad8df 100644 --- a/src/transform.ts +++ b/src/transform.ts @@ -64,7 +64,7 @@ const transform = async ( ); } // function imports - const statements = expressionBody.stmts || []; + const statements = expressionBody?.stmts || []; // @ts-ignore add typings for swc argument statements.forEach(({ argument }) => { if (argument?.callee?.value?.toLowerCase() === "import") {