Skip to content

setData() doesn't set data correctly #495

@Remeic

Description

@Remeic

Version

2.5.16

Reproduction link

https://github.com/Remeic/vue-highlighter/tree/tests

Steps to reproduce

Clone repository, checkout on tests branch and run yarn test

What is expected?

wrapper.setData() change data of App correctly and directive can update the highlighted word

What is actually happening?

setData doesn't update correctly the data and console print "Cannot read property 'split' of undefined", seems wrapper is not mounted, if i remove data from App.vue SFC error changes and it is "Avoid adding reactive properties to a Vue instance or its root $data at runtime - declare it upfront in the data option."

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