mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 06:35:20 +00:00
fix(plugin-field-sort): fix ts type
This commit is contained in:
parent
2ac5457583
commit
0e95e36432
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
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 { move } from './action';
|
||||
@ -25,8 +25,7 @@ export class PluginFieldSortServer extends Plugin {
|
||||
});
|
||||
|
||||
this.app.dataSourceManager.beforeAddDataSource((dataSource: DataSource) => {
|
||||
// @ts-ignore
|
||||
if (dataSource.collectionManager?.db) {
|
||||
if (dataSource.collectionManager instanceof SequelizeCollectionManager) {
|
||||
dataSource.resourceManager.registerActionHandlers({ move });
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user