mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
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:
parent
02231f542c
commit
25a70a48e9
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user