Skip to content

Commit ed16ba1

Browse files
committed
Fix command trigger initialization for editor
1 parent e06900d commit ed16ba1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/PromptEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ interface DocumentEditorProps {
4343
}
4444

4545
const useCommandTrigger = (trigger: number, callback: () => void | Promise<void>) => {
46-
const previousRef = useRef(trigger);
46+
const previousRef = useRef<number | null>(null);
4747
const callbackRef = useRef(callback);
4848

4949
useEffect(() => {

0 commit comments

Comments
 (0)