fix(react/type_widget): mind map attachment incorrect

This commit is contained in:
Elian Doran 2025-09-21 10:32:01 +03:00
parent e117fbd471
commit 58b14ae31c
No known key found for this signature in database

View File

@ -26,7 +26,7 @@ export default function MindMap({ note, ntxId }: TypeWidgetProps) {
const containerRef = useRef<HTMLDivElement>(null);
const spacedUpdate = useEditorSpacedUpdate({
note,
getData: () => {
getData: async () => {
if (!apiRef.current) return;
return {
content: apiRef.current.getDataString(),
@ -35,7 +35,7 @@ export default function MindMap({ note, ntxId }: TypeWidgetProps) {
role: "image",
title: "mindmap-export.svg",
mime: "image/svg+xml",
content: apiRef.current.exportSvg().text(),
content: await apiRef.current.exportSvg().text(),
position: 0
}
]