Skip to content

Vue tries to observe enumerable but non-configurable properties #2393

@saul

Description

@saul

Vue.js version

1.0.16

Reproduction Link

https://jsfiddle.net/5sH6A/275/
Check JavaScript console for error.

Steps to reproduce

Add a non-configurable, but enumerable property to component data/props.

What is expected?

Vue.js should not be redefining properties that are not configurable in defineReactive as by virtue of being non-configurable, they cannot change anyway so observing them is pointless (and also throws an error).

This bug currently makes it impossible to add Three.js objects to Vue components without causing this error. However a current workaround is to set convertAllProperties = true, as this triggers checks to ensure that non-configurable properties are not redefined.

What is actually happening?

Uncaught TypeError: Cannot redefine property: <property name>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions