Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.

Fix "addEventListener is not a function" #267

Merged
merged 1 commit into from
Nov 24, 2020

Conversation

onedevlad
Copy link
Contributor

Hey! We kept getting "a.addEventListener is not a function" from this part of the code in our Electron environment. We believe this may have to do with #68 and it was partially fixed by #75. In our case this issue is caused by notification being an empty object.


if (Util.isFunction(options.onError))
notification.addEventListener('error', options.onError);
if (Util.isFunction(options.onError))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, but it looks like a bunch of these changes are just adding indents? Or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these are just indents caused by if (Util.isFunction(notification.addEventListener)) that wraps these if statements.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, my bad. Approved.

@Nickersoft Nickersoft merged commit 06cb2e2 into Nickersoft:master Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants