canjs / can-define

Observable properties
https://canjs.com/doc/can-define.html
MIT License
15 stars 7 forks source link

Warn when a default is falsey #466

Closed mikemitchel closed 5 years ago

mikemitchel commented 5 years ago

default will be ignored if a property has a getter. We should warn in cases like

get foo() {
  return "bar";
},
default: undefined

should update to handle falsey values aka default exists w/ getter at all: https://github.com/canjs/can-define/blob/a68859ae60e1e0ad151cb81149521055ba1c049c/can-define.js#L237-L239 can-define.js:237-239