Skip to content

1.0.5 breaks data merge #1678

Open
Open
@nicooprat

Description

@nicooprat

Subject of the issue

Upgrading from 1.0.4 to 1.0.5 makes some of our tests to fail. Looks like the data merge is broken, and adding a console.log() in the data() function at wrapper creation is now displayed twice:

With 1.0.4:

image

With 1.0.5:

image

The first one pass through here: https://github.com/vuejs/vue/blob/7912f75c5eb09e0aef3e4bfd8a3bb78cad7540d7/src/core/util/options.js#L104

The second time through there: https://github.com/vuejs/vue/blob/7912f75c5eb09e0aef3e4bfd8a3bb78cad7540d7/src/core/util/options.js#L98

Our code creates a wrapper by merging instance options like this:

const wrapper = shallowMount(OpportunityFeedback, { data() { ... });

Steps to reproduce

Tell us how to reproduce this issue. Please provide a working and simplified example.

Expected behaviour

The data gets merged correctly as before.

Actual behaviour

Data become undefined and this errocr is printed:

[Vue warn]: Avoid adding reactive properties to a Vue instance or its root $data at runtime - declare it upfront in the data option.

Possible Solution

Sticking to 1.0.4 for now. Maybe related? #1677

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions