Skip to content

Component Props: coerce not working with default option in v1.0.20 #2606

@JosephusPaye

Description

@JosephusPaye

Hi there, first I would like to say thanks for Vue, it is truly awesome.

I think I may have found a slight regression in Vue 1.0.20. It seems like the default option for component props is not passed through the coerce function in Vue 1.0.20. I had this working in 1.0.17 before I upgraded. See the Fiddles below for details.

Thanks

Vue.js version

1.0.20

Reproduction Link

Not working Fiddle (Vue 1.0.20): http://jsfiddle.net/5sH6A/292/
Working Fiddle (Vue 1.0.17): http://jsfiddle.net/0w62a9xx/1/

Steps to reproduce

See the Fiddles above.

What is Expected?

The prop default should be passed through the coerce function.

What is actually happening?

Only props that are specified in the template (and not defaults) are passed through the coerce function.

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