itsfrank / vue-typescript

Typescript decorators to make vue feel more typescripty
MIT License
357 stars 25 forks source link

Prop default not recognized when falsy value #3

Closed itsfrank closed 8 years ago

itsfrank commented 8 years ago

When defining a prop default in the form: @Prop theProp:boolean = false; where the value assigned should be treated as a default. It would not be removed from data. Cause vue error because the variavle was double set (once by prop, once by data).

Fixed by changing if(!props[key]) to if(props[key] == null)

Fixed in 0.5.0, non-breaking