Skip to content

Commit

Permalink
fix(model): userConfig.model might be undefined (#12848)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc authored Dec 16, 2024
1 parent e752ceb commit 9bbcc9f
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 9bbcc9f

Please sign in to comment.