Skip to content

Can't access variable in v-if when defined in v-for on the same element #1165

@rashfael

Description

@rashfael

Version

3.0.0-beta.10

Reproduction link

https://jsfiddle.net/4qxok5gh/3/

Steps to reproduce

  • Run the reproduction

What is expected?

Reproduction should render:

2
3

What is actually happening?

A warning is printed in the console:

[Vue warn]: Property "a" was accessed during render but is not defined on instance.

I know that using v-for and v-if together is not recommended, but I could not find any rfc or issue in vue-next for a stricter enforcement of that best practice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions