changes from review
This commit is contained in:
parent
75a117e4e2
commit
933c7330a5
2 changed files with 21 additions and 16 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue