refactor: add emitCustomEvent() helper (#17960)

This commit is contained in:
Milan Burda 2019-05-01 15:07:57 +02:00 committed by Alexey Kuzmin
parent aebad6fd21
commit 6f5c850d60
5 changed files with 35 additions and 48 deletions

View file

@ -166,7 +166,7 @@ if (nodeIntegration) {
// Redirect window.onerror to uncaughtException.
window.onerror = function (_message, _filename, _lineno, _colno, error) {
if (global.process.listeners('uncaughtException').length > 0) {
if (global.process.listenerCount('uncaughtException') > 0) {
// We do not want to add `uncaughtException` to our definitions
// because we don't want anyone else (anywhere) to throw that kind
// of error.