mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
refactor: add emitCustomEvent() helper (#17960)
This commit is contained in:
committed by
Alexey Kuzmin
parent
aebad6fd21
commit
6f5c850d60
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user