diff --git a/src/app.ts b/src/app.ts index b9419b5..868374c 100644 --- a/src/app.ts +++ b/src/app.ts @@ -47,8 +47,8 @@ const runEvent = (name: string, args: any[]) => { }; const getTenParam = (fn: RunFunkce): string | undefined => fn.toString() - .match(/(?:function\s.*?)?\(([^)]*)\)/)![1] - .split(",")[1] + .match(/(?:function\s.*?)?\(([^)]*)\)|\w+ =>/)![1] + ?.split(",")[1] ?.trim(); const fnToArg = (fn: RunFunkce | string) => {