I have a custom react class that creates its own events. I can get pux to recognize these events but each event triggers twice, once with the proper data (which is just an array not an event) and once with undefined. It seems that the problem is the function below which will call the event handler twice if ev.nativeEvent is undefined. Is this intentional?
exports.reactHandler = function (input) {
return function (handler) {
return function (ev) {
if (ev.nativeEvent === undefined) {
input(handler(ev))();
}
input(handler(ev.nativeEvent))();
};
};
};
I have a custom react class that creates its own events. I can get pux to recognize these events but each event triggers twice, once with the proper data (which is just an array not an event) and once with
undefined
. It seems that the problem is the function below which will call the event handler twice if ev.nativeEvent is undefined. Is this intentional?