Skip to content

L8 code and video change the inStock variable type. #66

@weisebrazil

Description

@weisebrazil

The L8 code starts with a property inStock: true and finishes with a computed value that returns an integer type.

What it could be done is the code below:

...
inStock() {
    return this.variants[this.selectedVariant].quantity > 0
},
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions