File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import { ref , computed } from " vue" ;
3- import { useFeatures , type FeatureMetadata } from " ../composables/useFeatures" ;
3+ import { useFeatures } from " ../composables/useFeatures" ;
4+ import type { FeatureMetadata , FeatureOption } from " ../types" ;
45import SearchableSelect from " ./SearchableSelect.vue" ;
56
67const props = defineProps <{
@@ -53,7 +54,8 @@ function toggleFeature(feature: FeatureMetadata) {
5354 const defaults: Record <string , any > = {};
5455 if (feature .options ) {
5556 Object .entries (feature .options ).forEach (([key , opt ]) => {
56- if (opt .default !== undefined ) defaults [key ] = opt .default ;
57+ const option = opt as FeatureOption ;
58+ if (option .default !== undefined ) defaults [key ] = option .default ;
5759 });
5860 }
5961 newFeatures [feature .id ] = defaults ;
You can’t perform that action at this time.
0 commit comments