Skip to content

Null prop value now interpreted as a value, rather than null, meaning the default isnt used. #3135

Closed
@leeovery

Description

@leeovery

Hi,

Vue.js version

1.0.25

Reproduction Link

http://jsfiddle.net/st5bak15/2/

This break occurred after upgrading to 1.0.25. It worked as (I) expect in 1.0.24 and below...

What's Happening?

Previously I was defining a prop value on a component as either a json object, or null, depending on whether it was defined or not.

In the case of the prop value being null, Vue would default to using the defined prop default from the component, rather than explicitly null.

However, now the opposite is happening. When null is sent in as the prop value, the prop value remains as null, rather than being recognised as null and then loading up the default value.

Not sure if this was an intended change or not but thought Id highlight it as it has broke my app.

Cheers
Lee

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