[PUI] Fix saveNotes callback (#7545)

* [PUI] Fix saveNotes callback

* add delay to playwright test
This commit is contained in:
Oliver
2024-07-07 09:19:50 +10:00
committed by GitHub
parent 13ee755ad3
commit 97b6258797
2 changed files with 7 additions and 1 deletions
@@ -142,7 +142,12 @@ export default function NotesEditor({
// Callback to save notes to the server
const saveNotes = useCallback(() => {
const markdown = ref.current?.getMarkdown() ?? '';
const markdown = ref.current?.getMarkdown();
if (!noteUrl || markdown === undefined) {
return;
}
api
.patch(noteUrl, { notes: markdown })
.then(() => {