Chore: Desktop: Make useFormNote test less likely to fail (#12131)

pull/12051/head^2
Henry Heino 2025-04-18 02:30:24 -07:00 committed by GitHub
parent 66203bda56
commit eccb8350fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -114,8 +114,8 @@ const useRefreshFormNoteOnChange = (formNoteRef: RefObject<FormNote>, editorId:
const refreshFormNote = useCallback(() => {
// Increase the counter to cancel any ongoing refresh attempts
// and start a new one.
setFormNoteRefreshScheduled(formNoteRefreshScheduled + 1);
}, [formNoteRefreshScheduled]);
setFormNoteRefreshScheduled(count => count + 1);
}, []);
// When switching from the plugin editor to the built-in editor, we refresh the note since the
// plugin may have modified it via the data API.