Skip to content

Commit

Permalink
fix: add missing prop controls
Browse files Browse the repository at this point in the history
  • Loading branch information
larsrickert committed Jul 31, 2024
1 parent 61b8fc3 commit 7232754
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/frameworks/vue3-vite/src/plugins/vue-component-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 7232754

Please sign in to comment.