Skip to content

Commit

Permalink
fix(ssr): handle default arguments properly in ssrTransform (vitejs…
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Nov 8, 2021
1 parent 09acb98 commit dcecdc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/ssr/ssrTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ function walk(
// walk function expressions and add its arguments to known identifiers
// so that we don't prefix them
node.params.forEach((p) =>
(eswalk as any)(p, {
(eswalk as any)(p.type === 'AssignmentPattern' ? p.left : p, {
enter(child: Node, parent: Node) {
if (
child.type === 'Identifier' &&
Expand Down

0 comments on commit dcecdc9

Please sign in to comment.