From 7232754985351e2d304b6fa94228ad76e74b861e Mon Sep 17 00:00:00 2001 From: Lars Rickert Date: Wed, 31 Jul 2024 10:19:34 +0200 Subject: [PATCH] fix: add missing prop controls --- code/frameworks/vue3-vite/src/plugins/vue-component-meta.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/frameworks/vue3-vite/src/plugins/vue-component-meta.ts b/code/frameworks/vue3-vite/src/plugins/vue-component-meta.ts index c7218e328fc6..175ea0a2cfd9 100644 --- a/code/frameworks/vue3-vite/src/plugins/vue-component-meta.ts +++ b/code/frameworks/vue3-vite/src/plugins/vue-component-meta.ts @@ -271,5 +271,11 @@ async function getTsConfigReferences(tsConfigPath: string) { */ function removeNestedSchemas(schema: PropertyMetaSchema) { if (typeof schema !== 'object') return; + if (schema.kind === 'enum') { + // for enum types, we do not want to remove the schemas because otherwise the controls will be missing + // instead we remove the nested schemas for the enum entries to prevent out of memory errors for types like "HTMLElement | MouseEvent" + schema.schema?.forEach((enumSchema) => removeNestedSchemas(enumSchema)); + return; + } delete schema.schema; }