mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-12 00:20:15 +00:00
refactor: remove redundant = false defaults on boolean props (#9155)
## Summary Remove redundant `= false` defaults from destructured `defineProps` on boolean props, since Vue's [Boolean casting](https://vuejs.org/guide/components/props.html#boolean-casting) already defaults absent boolean props to `false`. ## Changes - **What**: Remove 10 unnecessary `= false` default values across 8 components ## Review Focus Vue compiles `defineProps<{ myBool?: boolean }>()` to `{ myBool: { type: Boolean, required: false } }`. Boolean casting means absent boolean props are already `false` — the explicit `= false` in JS destructuring defaults never triggers. Follow-up to #9150. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9155-refactor-remove-redundant-false-defaults-on-boolean-props-3116d73d36508196af0bcba53257720a) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -78,7 +78,7 @@ interface Props {
|
||||
isActive?: boolean
|
||||
}
|
||||
|
||||
const { item, isActive = false } = defineProps<Props>()
|
||||
const { item, isActive } = defineProps<Props>()
|
||||
|
||||
const nodeDefStore = useNodeDefStore()
|
||||
const hasMissingNodes = computed(() =>
|
||||
|
||||
Reference in New Issue
Block a user