Fix “Invalid prop: type check failed for prop "answers" warnings displayed in the DevTools Console when opening the “vehicle-year” page locally.

Initial value for "years" should be assigned to an empty array. "Array" is a function and need to be called with "new Array()" to get an empty array. I opted for a shorter syntax but the idea is the same.
This commit is contained in:
Johan Gunawan 2022-12-01 15:12:09 -05:00
parent b024112cac
commit 8281a7faf9

View file

@ -20,7 +20,7 @@
name: "year-question",
data() {
return {
years: Array,
years: [],
};
},
props: {