chore: destory collection in share collection plugin (#2968)

This commit is contained in:
ChengLei Shao 2023-11-05 19:36:53 +08:00 committed by GitHub
parent 9249dcb896
commit 2c58d515da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -237,8 +237,10 @@ export class MultiAppShareCollectionPlugin extends Plugin {
this.app.db.on(`afterRemoveCollection`, (collection) => {
const subApps = [...AppSupervisor.getInstance().subApps()];
for (const subApp of subApps) {
if (subApp.db.hasCollection(collection.name)) {
subApp.db.removeCollection(collection.name);
}
}
});
}