Skip to content

Commit

Permalink
fix(model): userConfig.model might be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Dec 16, 2024
1 parent e752ceb commit 3869c80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugins/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default (api: IApi) => {

api.onGenerateFiles(async () => {
const models = await getAllModels(api);
if (api.userConfig.model.sort) {
if (api.userConfig.model?.sort) {
models.sort(api.userConfig.model.sort);
}

Expand Down

0 comments on commit 3869c80

Please sign in to comment.