Skip to content

Commit d0c4b7b

Browse files
committed
feat: update jsonFormatter to stringify value before formatting
1 parent 576667a commit d0c4b7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/editor/Editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export const Editor: React.FC<EditorInputProps> = (props) => {
160160
const containerRef = React.useRef<HTMLDivElement>(null)
161161

162162
const jsonFormatter = (value: string) => {
163-
return prettier.format(value, {
163+
return prettier.format(JSON.stringify(value), {
164164
parser: "json",
165165
plugins: [parserBabel, parserEstree],
166166
printWidth: 1

0 commit comments

Comments
 (0)