diff --git a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts index 655dea1f1c..ff64f811ec 100644 --- a/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts +++ b/packages/plugins/@nocobase/plugin-multi-app-share-collection/src/server/plugin.ts @@ -237,7 +237,9 @@ export class MultiAppShareCollectionPlugin extends Plugin { this.app.db.on(`afterRemoveCollection`, (collection) => { const subApps = [...AppSupervisor.getInstance().subApps()]; for (const subApp of subApps) { - subApp.db.removeCollection(collection.name); + if (subApp.db.hasCollection(collection.name)) { + subApp.db.removeCollection(collection.name); + } } }); }