diff --git a/src/plugins/expressions/common/expression_renderers/types.ts b/src/plugins/expressions/common/expression_renderers/types.ts index ae5d68dce4172..a4fbcf36fc8d7 100644 --- a/src/plugins/expressions/common/expression_renderers/types.ts +++ b/src/plugins/expressions/common/expression_renderers/types.ts @@ -101,11 +101,11 @@ export class DefaultInterpreterRenderHandlers implements IInterpr const eventName = event as keyof this; if (this[eventName]) { const eventCall = this[eventName]; - if (!eventCall || typeof eventCall !== 'function') return; + if (typeof eventCall !== 'function') return; const updatedEvent = (...args: unknown[]) => { const preventFromCallingListener: void | boolean = eventCall(...args); - if (fn && typeof fn === 'function' && !preventFromCallingListener) { + if (typeof fn === 'function' && !preventFromCallingListener) { fn(...args); } return preventFromCallingListener;