Skip to content

TypeError: Cannot define property:__v-for__1, object is not extensible. #2809

@sirlancelot

Description

@sirlancelot

I have a list of objects to which I don't need observation to happen. The recommended way I've read about is to use Object.freeze() which works great except when I need to iterate over frozen objects in an array.

Vue.js version

1.0.21

Reproduction Link

http://codepen.io/sirlancelot/pen/aNPaNZ

Steps to reproduce

  • Create an array of frozen objects with Object.freeze()
  • The array should NOT be frozen, just the items within it.
  • Iterate over the array with v-for=""

What is Expected?

Array is rendered without errors.

What is actually happening?

An error is emitted in the console: Uncaught TypeError: Cannot define property:__v-for__1, object is not extensible.

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