From 6ae740ae6e7750e4ff8027fafb137332ec684892 Mon Sep 17 00:00:00 2001 From: Satyam Bansal Date: Thu, 21 Dec 2023 18:06:51 +0530 Subject: [PATCH] Fix model name generate logic in generate components script --- packages/core/bin/generateComponents.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/bin/generateComponents.cjs b/packages/core/bin/generateComponents.cjs index 563810e4..9b9118b3 100755 --- a/packages/core/bin/generateComponents.cjs +++ b/packages/core/bin/generateComponents.cjs @@ -55,7 +55,7 @@ manifest.models.forEach((model) => { let result = model.name.split("::").pop().split("_"); let modelName = result .map((part) => { - return part === part.toLowerCase() && part.length > 2 + return part === part.toLowerCase() && part.length > 1 ? part.charAt(0).toUpperCase() + part.slice(1) : part.toUpperCase(); })