Skip to content

Commit 02dee89

Browse files
committed
ref current assignment
1 parent c73a438 commit 02dee89

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/compass-crud/src/components/json-editor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const JSONEditor: React.FunctionComponent<JSONEditorProps> = ({
8484
const setModifiedEJSONStringRef = useRef<(value: string | null) => void>(
8585
doc.setModifiedEJSONString.bind(doc)
8686
);
87+
setModifiedEJSONStringRef.current = doc.setModifiedEJSONString.bind(doc);
8788

8889
useEffect(() => {
8990
const setModifiedEJSONString = setModifiedEJSONStringRef.current;

0 commit comments

Comments
 (0)