From cf5bec18941ab740074799355d0bb07570e46a26 Mon Sep 17 00:00:00 2001 From: Aman Karmani Date: Fri, 17 Jan 2025 00:18:35 -0800 Subject: [PATCH] fix: solid-devtools AST changes were being lost fixes #78 --- src/babel/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/babel/index.ts b/src/babel/index.ts index c7595a8..71f0b89 100644 --- a/src/babel/index.ts +++ b/src/babel/index.ts @@ -307,7 +307,7 @@ function bubbleFunctionDeclaration( decl.params.length < 2 ) { const first = program.get('body')[0]; - const [tmp] = first.insertBefore(decl); + const [tmp] = first.insertBefore(t.cloneNode(decl)); program.scope.registerDeclaration(tmp); tmp.skip(); if (path.parentPath.isExportNamedDeclaration()) {