sindresorhus / electron-unhandled

Catch unhandled errors and promise rejections in your Electron app
MIT License
448 stars 26 forks source link

Silence deprecation warning in Electron 7 #15

Closed raphinesse closed 5 years ago

raphinesse commented 5 years ago

Running the current code on Electron 7 issues the following warning: 'getName function' is deprecated and will be removed. Please use 'name property' instead.

Unfortunately, the name property is first documented for Electron 7 too. So to maintain compatibility, we detect it's presence and use it only if available.