Skip to content

Commit

Permalink
fix(ssr): use structured clone when converting wired getter to prop
Browse files Browse the repository at this point in the history
  • Loading branch information
wjhsf committed Dec 2, 2024
1 parent c712f25 commit 7d9b148
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@lwc/ssr-compiler/src/compile-js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ const visitors: Visitors = {
// Note that this means that their implementations are ignored!
if (node.kind === 'get' || node.kind === 'set') {
const methodAsProp = b.propertyDefinition(
node.key,
structuredClone(node.key),
null,
node.computed,
node.static
);
methodAsProp.decorators = decorators;
methodAsProp.decorators = structuredClone(decorators);
path.replaceWith(methodAsProp);
return;
} else {
Expand Down

0 comments on commit 7d9b148

Please sign in to comment.