Skip to content

Commit

Permalink
Stateless
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jan 20, 2023
1 parent 40f1e3d commit 975c54d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/next-swc/crates/core/src/server_actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ impl VisitMut for ServerActions {
}

fn visit_mut_stmts(&mut self, stmts: &mut Vec<Stmt>) {
let old_top_level = self.top_level;
let old_annotations = self.annotations.take();

let mut new = Vec::with_capacity(stmts.len());
Expand All @@ -235,6 +236,7 @@ impl VisitMut for ServerActions {
*stmts = new;

self.annotations = old_annotations;
self.top_level = old_top_level;
}

noop_visit_mut_type!();
Expand Down

0 comments on commit 975c54d

Please sign in to comment.