Skip to content

Commit

Permalink
fix(components): fix computed insert, fix #256
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Dec 11, 2023
1 parent 625f837 commit 648bc55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/client/form/computed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const actions = {
branches[index] = { ...branches[index], [key]: value }
emit('update:modelValue', { $switch: { ...props.modelValue.$switch, branches } })
},
insert(index: number = props.modelValue?.$switch.branches.length) {
insert(index: number = props.modelValue?.$switch?.branches.length) {
if (props.modelValue?.$switch) {
const branches = props.modelValue.$switch.branches.slice()
branches.splice(index, 0, { case: null, then: null })
Expand Down

0 comments on commit 648bc55

Please sign in to comment.