Value declared with a {type: String} but no default value behave like they have a default value
Intrepidd opened this issue · 0 comments
Intrepidd commented
Consider the following values :
static values = {
foo: {type: String},
bar: String
}
If both values are un-set, the following will happen
this.hasFooValue // true
this.hasBarValue // false
Looks like it comes from here :
stimulus/src/core/value_properties.ts
Line 55 in e6f1887
stimulus/src/core/value_properties.ts
Lines 213 to 215 in e6f1887
This is beyond my knowledge but it looks like there is a mixup about what is passed to parseValueTypeDefault