Intro-to-Vue-3
Intro-to-Vue-3 copied to clipboard
Branch L9-Start wrong values in inStock()
Hey guys, great tutorial!!
I have noticed that L9-Start , which should have the finished code of L8, on main.js line 30 it doesn't have the right value on the computed property inStock(). It is set to look for the property image instead of quantity
This might be confusing and frustrating for some users that need to compare their code with finished code and also, doesn't allow starting the lesson with fully working code.
https://github.com/Code-Pop/Intro-to-Vue-3/tree/L9-start
Current code:
inStock() {
return this.variants[this.selectedVariant].image
}
Correct code:
inStock() {
return this.variants[this.selectedVariant].quantity
}
Is there any way to contribute to the repo?
thanks
Nice find! Looks like this was fixed in this Pull Request: https://github.com/Code-Pop/Intro-to-Vue-3/pull/4 I hope it gets merged! Though it was a good exercise in debugging to try to find the problem.
Hi, It seems that the error has not been corrected.
Still waiting on this error to be corrected. Also picked it up today more than a year later