From 975c54d15fee460eee0ada322d2c13952bd40bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Fri, 20 Jan 2023 20:03:52 +0900 Subject: [PATCH] Stateless --- packages/next-swc/crates/core/src/server_actions.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/next-swc/crates/core/src/server_actions.rs b/packages/next-swc/crates/core/src/server_actions.rs index f34c1f4ac42ec..6041345f04c29 100644 --- a/packages/next-swc/crates/core/src/server_actions.rs +++ b/packages/next-swc/crates/core/src/server_actions.rs @@ -221,6 +221,7 @@ impl VisitMut for ServerActions { } fn visit_mut_stmts(&mut self, stmts: &mut Vec) { + let old_top_level = self.top_level; let old_annotations = self.annotations.take(); let mut new = Vec::with_capacity(stmts.len()); @@ -235,6 +236,7 @@ impl VisitMut for ServerActions { *stmts = new; self.annotations = old_annotations; + self.top_level = old_top_level; } noop_visit_mut_type!();