79156186

Date: 2024-11-04 16:09:48
Score: 1
Natty:
Report link

After 3 years, I answer my own question. Just add a question mark at the point that makes errors. It will execute if the variable exists.

<router-link v-bind:to="{ name: 'categories.show', params: { id: post?.category_id } }">
    {{ post?.category_name }}
</router-link>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: user16806454