chore: destory collection in share collection plugin (#2968)
This commit is contained in:
parent
9249dcb896
commit
2c58d515da
@ -237,7 +237,9 @@ export class MultiAppShareCollectionPlugin extends Plugin {
|
|||||||
this.app.db.on(`afterRemoveCollection`, (collection) => {
|
this.app.db.on(`afterRemoveCollection`, (collection) => {
|
||||||
const subApps = [...AppSupervisor.getInstance().subApps()];
|
const subApps = [...AppSupervisor.getInstance().subApps()];
|
||||||
for (const subApp of subApps) {
|
for (const subApp of subApps) {
|
||||||
subApp.db.removeCollection(collection.name);
|
if (subApp.db.hasCollection(collection.name)) {
|
||||||
|
subApp.db.removeCollection(collection.name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user