fix(plugin-field-sort): fix ts type

This commit is contained in:
mytharcher 2024-10-14 17:28:44 +08:00
parent 2ac5457583
commit 0e95e36432

View File

@ -8,7 +8,7 @@
*/ */
import { Plugin } from '@nocobase/server'; import { Plugin } from '@nocobase/server';
import { DataSource } from '@nocobase/data-source-manager'; import { DataSource, SequelizeCollectionManager } from '@nocobase/data-source-manager';
import { SortField } from './sort-field'; import { SortField } from './sort-field';
import { move } from './action'; import { move } from './action';
@ -25,8 +25,7 @@ export class PluginFieldSortServer extends Plugin {
}); });
this.app.dataSourceManager.beforeAddDataSource((dataSource: DataSource) => { this.app.dataSourceManager.beforeAddDataSource((dataSource: DataSource) => {
// @ts-ignore if (dataSource.collectionManager instanceof SequelizeCollectionManager) {
if (dataSource.collectionManager?.db) {
dataSource.resourceManager.registerActionHandlers({ move }); dataSource.resourceManager.registerActionHandlers({ move });
} }
}); });