From 9bbcc9f27c8d4417431ecc48af17fa5736c68c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?chencheng=20=28=E4=BA=91=E8=B0=A6=29?= Date: Mon, 16 Dec 2024 14:27:56 +0800 Subject: [PATCH] fix(model): userConfig.model might be undefined (#12848) --- packages/plugins/src/model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/src/model.ts b/packages/plugins/src/model.ts index af262f981616..8259e20f0f07 100644 --- a/packages/plugins/src/model.ts +++ b/packages/plugins/src/model.ts @@ -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); }