client: fix sourcemaps (stacktrace-js doesn't like when sourcecode is included in maps, good news for file size!)
This commit is contained in:
parent
af2a771b7d
commit
96f5cd0cf5
2 changed files with 2 additions and 11 deletions
|
|
@ -10,17 +10,7 @@ window.onerror = function(msg,url,row,col, error) {
|
|||
|
||||
StackTrace.fromError(error).then((stackframes)=>{
|
||||
|
||||
var stringifiedStack = stackframes.filter((sf)=>{
|
||||
|
||||
return !sf.fileName.match('browser-pack')
|
||||
|
||||
}).map(function(sf) {
|
||||
|
||||
if (sf.functionName.match(/Object\./)) sf.functionName = 'require'
|
||||
|
||||
return ` at ${sf.functionName} (${sf.fileName}:${sf.lineNumber}:${sf.columnNumber})`
|
||||
|
||||
}).join('\n')
|
||||
var stringifiedStack = stackframes.join('\n')
|
||||
|
||||
uiConsole.log('error', `${msg}\n${stringifiedStack}`)
|
||||
ipc.send('errorLog', `(ERROR, CLIENT) ${msg}\n${stringifiedStack}`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue