Skip to content

Commit a923538

Browse files
committed
fix: add missing prop controls
1 parent 87c3757 commit a923538

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

code/frameworks/vue3-vite/src/plugins/vue-component-meta.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,11 @@ async function getTsConfigReferences(tsConfigPath: string) {
284284
* HTMLElement, MouseEvent) are used.
285285
*/
286286
function removeNestedSchemas(schema: PropertyMetaSchema) {
287-
if (typeof schema !== 'object') {
287+
if (typeof schema !== 'object') return;
288+
if (schema.kind === 'enum') {
289+
// for enum types, we do not want to remove the schemas because otherwise the controls will be missing
290+
// instead we remove the nested schemas for the enum entries to prevent out of memory errors for types like "HTMLElement | MouseEvent"
291+
schema.schema?.forEach((enumSchema) => removeNestedSchemas(enumSchema));
288292
return;
289293
}
290294
delete schema.schema;

0 commit comments

Comments
 (0)