Skip to content

Commit

Permalink
fix(core/utils): prevent undefined access on OnListener decorator (#1000
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jul-lam committed Dec 14, 2023
1 parent f5c6f81 commit 1711c08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/components/utils/listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function OnListener<T>(event: string, fnExp?: (self: T) => boolean) {
proto.disconnectedCallback = function () {
const host = getElement(this);

host[`__ix__${methodName}`].destroy();
host[`__ix__${methodName}`]?.destroy();
host[`__ix__${methodName}`] = null;
return disconnectedCallback && disconnectedCallback.call(this);
};
Expand Down

0 comments on commit 1711c08

Please sign in to comment.