FIX issue with event being undefined

I don't know why the event data is undefined, but whatever, that can happen to anyone. Someone's you feel like undefined
You just have to hang on and wait for better times. You can't always win.

Sure I could filter out the undefined, but let's be real, don't hide the undefined, just let it be. It will pass.
This commit is contained in:
Norbert de Langen 2019-04-05 11:10:16 +02:00
parent 02231f542c
commit 25a70a48e9

View File

@ -66,7 +66,7 @@ export class Channel {
emit(eventName: string, ...args: any) {
const event: ChannelEvent = { type: eventName, args, from: this.sender };
let options = {};
if (args.length >= 1 && args[0].options) {
if (args.length >= 1 && args[0] && args[0].options) {
options = args[0].options;
}