Skip to content

Commit

Permalink
Fix error when using single quotes in UI builder (#1709)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtenz authored Aug 30, 2023
1 parent 5ed28e4 commit 094bcca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/snaps-simulator/src/features/builder/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function getComponentArgs(component: Component): string {
case NodeType.Text:
case NodeType.Heading:
case NodeType.Copyable:
return `'${component.value}'`;
return `'${component.value.replace(/'/gu, "\\'")}'`;
case NodeType.Spinner:
case NodeType.Divider:
default:
Expand Down

0 comments on commit 094bcca

Please sign in to comment.