Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when the prop name of the component is an array, throw error from 1.1.4 and later #1854

Closed
blusoul opened this issue May 31, 2021 · 1 comment · Fixed by #1857
Closed

when the prop name of the component is an array, throw error from 1.1.4 and later #1854

blusoul opened this issue May 31, 2021 · 1 comment · Fixed by #1857

Comments

@blusoul
Copy link

blusoul commented May 31, 2021

Subject of the issue

My unit tests started breaking from 1.1.4 and later

Steps to reproduce

    const wrapper = mount(
      {
        props: {
          name: ["start", "end"]
        },
        template: `<Wrapper><Inner :name="name" /></Wrapper>`
      },
      {
        stubs: {
          Wrapper,
          Inner
        }
      }
    );

    // name is array
    // from 1.1.4 throw error: TypeError: str.replace is not a function
    console.log(wrapper.findComponent(Wrapper));

vue-test
Demo

Expected behaviour

When i downgrade to 1.1.3, it is ok, but findComponent({name: 'xxx'}) has error

@lmiller1990
Copy link
Member

Thanks for the report, looks like we have a fix in #1857. I will work with the author to merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants