Skip to content

This reference is undefined in template's v-for loops #10190

@gewoonwoutje

Description

@gewoonwoutje

Version

2.6.10

Reproduction link

https://jsfiddle.net/caxzegtw/

Steps to reproduce

  • Look at the two this pointers; only one is working

What is expected?

This pointer should refer to the Vue instance.

What is actually happening?

In the fiddle; the this.message is not showing inside the v-for.
In our project; this is undefined and throws an error in the console.

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