Why Am I Getting Property Of Undefined In This Vue.js Example
My vue dev tools and unittests are being flooded with: Error in render: 'TypeError: Cannot read property 'time_start' of undefined' Cannot read property 'time_start' of undefined
Solution 1:
You're sending off an asynchronous request and the template is relying on this information to already exist. The component "looks fine" but for a split second it didn't have any real data to render (job_execs was still waiting for data when this attempted to render).
You can fix this by adding in a v-if statement to your tag like so:
<td v-if:"job_execs" :style="tdStyle">{{ job_execs[0].time_start }}</td>
Hope this helps :-)
Post a Comment for "Why Am I Getting Property Of Undefined In This Vue.js Example"