mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-02-15 07:28:59 +00:00
Fix uncaught errors from ResizeObserver
This commit is contained in:
@@ -233,6 +233,10 @@
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.NavSidebarSearchHeader .module-SearchInput__container {
|
||||
flex: 1 0 0;
|
||||
}
|
||||
|
||||
.NavSidebarEmpty {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
.module-SearchInput {
|
||||
&__container {
|
||||
position: relative;
|
||||
flex: 1 0 0;
|
||||
margin-inline: 16px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
@@ -114,22 +114,7 @@ window.SignalContext.log = {
|
||||
trace: log.trace,
|
||||
};
|
||||
|
||||
function toLocation(
|
||||
event: string | Event,
|
||||
sourceArg?: string,
|
||||
lineArg?: number,
|
||||
columnArg?: number
|
||||
) {
|
||||
let source = sourceArg;
|
||||
let line = lineArg;
|
||||
let column = columnArg;
|
||||
|
||||
if (event instanceof ErrorEvent) {
|
||||
source ??= event.filename;
|
||||
line ??= event.lineno;
|
||||
column ??= event.colno;
|
||||
}
|
||||
|
||||
function toLocation(source?: string, line?: number, column?: number) {
|
||||
if (source == null) {
|
||||
return '(@ unknown)';
|
||||
}
|
||||
@@ -142,11 +127,11 @@ function toLocation(
|
||||
return `(@ ${source})`;
|
||||
}
|
||||
|
||||
window.onerror = (event, source, line, column, error) => {
|
||||
window.onerror = (message, source, line, column, error) => {
|
||||
const errorInfo = Errors.toLogFormat(error);
|
||||
log.error(
|
||||
`Top-level unhandled error: ${errorInfo}`,
|
||||
toLocation(event, source, line, column)
|
||||
`Top-level unhandled error: ${message}, ${errorInfo}`,
|
||||
toLocation(source, line, column)
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user