Intro-to-Vue-3 icon indicating copy to clipboard operation
Intro-to-Vue-3 copied to clipboard

Branch L9-Start wrong values in inStock()

Open amouratoglou opened this issue 3 years ago • 3 comments

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

amouratoglou avatar Jan 16 '21 14:01 amouratoglou

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.

michaelbutler avatar Jan 18 '21 15:01 michaelbutler

Hi, It seems that the error has not been corrected.

Syns369 avatar Aug 25 '21 16:08 Syns369

Still waiting on this error to be corrected. Also picked it up today more than a year later

Naude555 avatar Feb 08 '22 14:02 Naude555