fix(plugin-collection-manager): cannot destructure property 'skipExist' of 'loadOptions' as it is undefined.
This commit is contained in:
parent
31340f4773
commit
5e7e3c2c46
@ -49,8 +49,8 @@ const api = new Application({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
api.plugin(require('@nocobase/plugin-collection-manager'));
|
api.plugin(require('@nocobase/plugin-collection-manager').default);
|
||||||
api.plugin(require('@nocobase/plugin-ui-schema-storage'));
|
api.plugin(require('@nocobase/plugin-ui-schema-storage').default);
|
||||||
// api.plugin(require('@nocobase/plugin-acl'));
|
// api.plugin(require('@nocobase/plugin-acl'));
|
||||||
|
|
||||||
if (process.argv.length < 3) {
|
if (process.argv.length < 3) {
|
||||||
|
@ -9,12 +9,11 @@ interface LoadOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class CollectionModel extends MagicAttributeModel {
|
export class CollectionModel extends MagicAttributeModel {
|
||||||
|
|
||||||
get db(): Database {
|
get db(): Database {
|
||||||
return (<any>this.constructor).database;
|
return (<any>this.constructor).database;
|
||||||
}
|
}
|
||||||
|
|
||||||
async load(loadOptions?: LoadOptions) {
|
async load(loadOptions: LoadOptions = {}) {
|
||||||
const { skipExist, skipField } = loadOptions;
|
const { skipExist, skipField } = loadOptions;
|
||||||
const name = this.get('name');
|
const name = this.get('name');
|
||||||
let collection: Collection;
|
let collection: Collection;
|
||||||
|
Loading…
Reference in New Issue
Block a user