Open maksnester opened 5 years ago
@Alendorff If undefined
is returned, no value would be emitted, code is here: https://github.com/kaorun343/vue-property-decorator/blob/master/src/vue-property-decorator.ts#L116.
Specifically to your problem, you should debug it with Vue devtools.
as far as i can tell, the decorated function will always emit and if undefined
is returned from the decorated function it just won't emit the undefined
, only the args to the decorated function
this discussion is relevant https://github.com/kaorun343/vue-property-decorator/issues/146
I just refactored this method:
into this:
And my component started to emit key event unexpectedly and it ruins everything. Method is used in event handler like this:
Am I doing something wrong or it's just a bug?
I expected that no value would be emitted if
undefined
is returned from decorated function.