changes from review

This commit is contained in:
Shelley Vohr 2017-11-16 13:39:07 -05:00
parent 75a117e4e2
commit 933c7330a5
No known key found for this signature in database
GPG key ID: F13993A75599653C
2 changed files with 21 additions and 16 deletions

View file

@ -20,7 +20,6 @@ class CallbacksRegistry {
const regexp = /at (.*)/gi
const stackString = (new Error()).stack
let ref
let filenameAndLine
let match
@ -29,7 +28,7 @@ class CallbacksRegistry {
if (location.includes('native')) continue
if (location.includes('electron.asar')) continue
ref = /([^/^)]*)\)?$/gi.exec(location)
const ref = /([^/^)]*)\)?$/gi.exec(location)
filenameAndLine = ref[1]
break
}
@ -40,7 +39,7 @@ class CallbacksRegistry {
}
get (id) {
return this.callbacks[id] != null ? this.callbacks[id] : function () {}
return this.callbacks[id] || function () {}
}
apply (id, ...args) {