Skip to content

0.11.5 breaks repeat using $data #707

Closed
@benceg

Description

@benceg

I'm writing an application that needs to list arbitrary values in a JSON object two levels deep. Some of these values are arrays whose constituent objects contain id and value properties.

Consider the following code:

...
data : function() {
  return {
    model : {
      "arbitrary_key" : [
        { "id" : "1", "value" : "arbitrary value 1" },
        { "id" : "2", "value" : "arbitrary value 2" },
        { "id" : "3", "value" : "arbitrary value 3" },
        { "id" : "4", "value" : "arbitrary value 4" }
      ]
    }
  }
}
...
<li v-repeat="model">

  {{ $key }}

  <ul>
    <li v-repeat="$data">
      <label>{{ id }}</label>
      <var>{{ value }}</var>
    </li>
  </ul>

</li>

The code above outputs the list of four items as expected using Vue 0.11.4, but outputs nothing when using Vue 0.11.5. I don't believe there is a test case to cover this particular use case.

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