Skip to content

Commit

Permalink
[fix] Detached node in async loadColl
Browse files Browse the repository at this point in the history
  • Loading branch information
amivanoff committed Nov 27, 2024
1 parent 7e73914 commit 376e113
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/models/MstRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,11 @@ export const MstRepository = types
* @param coll -- Coll or CollConstr object or IRI
*/
removeColl(coll: string | any) {
//console.log('Repository.removeColl, ' + coll);
const id = typeof coll === 'string' ? coll : coll['@id'];
if (id) {
// Because it did not called in delete(id)
self.colls.get(id)?.beforeDetach();
self.colls.delete(id);
}
},
Expand Down

0 comments on commit 376e113

Please sign in to comment.