[Solved]Iterator is undefined in V-for

Hello! I have a drop down that's supposed to change based on the choice of a radio button. This works with a v-if="someOptionIsSelected" populate the dropdown with array1 v-else populate the dropdown with array2. However when I change the selection for the radio button option in v-for="option in array2" is undefined.

<select v-if="picked === 'Inn'" v-model="unitNum" aria-label="Default select example">
    <option v-for="option in array1" :value="option.value" :key="option.text">
      {{ option.text }}
    </option>
</select>
<select v-else v-model="unitNum" aria-label="Default select example">
  <option v-for="option in array2" :value="option.value" :key="option.text" >
    {{ option.text }}
  </option>
</select>


Does anyone understand whats going on?

edit: Uncaught (in promise) TypeError: option is undefined
Was this page helpful?