File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -38,22 +38,6 @@ export const hijackConsoleErrorsScript = (offs) => {
38
38
}], '*');
39
39
return false;
40
40
};
41
- // catch rejected promises
42
- window.onunhandledrejection = function (event) {
43
- if (event.reason && event.reason.message && event.reason.stack){
44
- var errorNum = event.reason.stack.split('about:srcdoc:')[1].split(':')[0];
45
- var fileInfo = getScriptOff(errorNum);
46
- var data = event.reason.message + ' (' + fileInfo[1] + ': line ' + fileInfo[0] + ')';
47
- window.parent.postMessage([{
48
- log: [{
49
- method: 'error',
50
- data: [data],
51
- id: Date.now().toString()
52
- }],
53
- source: fileInfo[1]
54
- }], '*');
55
- }
56
- };
57
41
` ;
58
42
return s ;
59
43
} ;
@@ -62,7 +46,7 @@ export const startTag = '@fs-';
62
46
63
47
export const getAllScriptOffsets = ( htmlFile ) => {
64
48
const offs = [ ] ;
65
- const hijackConsoleErrorsScriptLength = 52 ;
49
+ const hijackConsoleErrorsScriptLength = 36 ;
66
50
const embeddedJSStart = 'script crossorigin=""' ;
67
51
let foundJSScript = true ;
68
52
let foundEmbeddedJS = true ;
You can’t perform that action at this time.
0 commit comments