Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/webapp/app/components/code/JSONEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ export function JSONEditor(opts: JSONEditorProps) {
}
}, [defaultValue, view]);

const clear = useCallback(() => {
const clear = () => {
if (view === undefined) return;
view.dispatch({
changes: { from: 0, to: view.state.doc.length, insert: undefined },
});
onChange?.("");
}, [view]);
};

const copy = useCallback(() => {
if (view === undefined) return;
Expand Down
Loading