Skip to content

Commit

Permalink
ref current assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
mabaasit committed Oct 29, 2024
1 parent c73a438 commit 02dee89
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/compass-crud/src/components/json-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const JSONEditor: React.FunctionComponent<JSONEditorProps> = ({
const setModifiedEJSONStringRef = useRef<(value: string | null) => void>(
doc.setModifiedEJSONString.bind(doc)
);
setModifiedEJSONStringRef.current = doc.setModifiedEJSONString.bind(doc);

useEffect(() => {
const setModifiedEJSONString = setModifiedEJSONStringRef.current;
Expand Down

0 comments on commit 02dee89

Please sign in to comment.