Skip to content

Commit

Permalink
Add null check for block type in FormFieldEdit component
Browse files Browse the repository at this point in the history
- Prevent potential errors when displaying field type information
- Add conditional rendering to handle cases where block type might be undefined
  • Loading branch information
JhumanJ committed Feb 19, 2025
1 parent 2824825 commit d190211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/components/open/forms/fields/FormFieldEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
:type="field.type"
/>

<p class="text-sm text-gray-500">
<p class="text-sm text-gray-500" v-if="blocksTypes[field.type]">

Check warning on line 27 in client/components/open/forms/fields/FormFieldEdit.vue

View workflow job for this annotation

GitHub Actions / Run client linters

Attribute "v-if" should go before "class"

Check warning on line 27 in client/components/open/forms/fields/FormFieldEdit.vue

View workflow job for this annotation

GitHub Actions / Run client linters

'v-if' should be on a new line
{{ blocksTypes[field.type].title }}
</p>

Expand Down

0 comments on commit d190211

Please sign in to comment.