fix(react/type_widgets): relation map getting occassionally wiped

This commit is contained in:
Elian Doran 2025-10-03 13:16:20 +03:00
parent c5c304f85b
commit e8e93e985d
No known key found for this signature in database

View File

@ -192,6 +192,8 @@ async function useRelationData(noteId: string, mapData: MapData | undefined, map
const [ inverseRelations, setInverseRelations ] = useState<RelationMapPostResponse["inverseRelations"]>(); const [ inverseRelations, setInverseRelations ] = useState<RelationMapPostResponse["inverseRelations"]>();
async function refresh() { async function refresh() {
if (!noteIds) return;
const data = await server.post<RelationMapPostResponse>("relation-map", { noteIds, relationMapNoteId: noteId }); const data = await server.post<RelationMapPostResponse>("relation-map", { noteIds, relationMapNoteId: noteId });
const relations: ClientRelation[] = []; const relations: ClientRelation[] = [];