Import log instead of using it off of window

This commit is contained in:
Josh Perez
2021-09-17 14:27:53 -04:00
committed by GitHub
parent 8eb0dd3116
commit 65ddf0a9e8
155 changed files with 3654 additions and 3433 deletions

View File

@@ -5,6 +5,7 @@ import React, { ReactNode } from 'react';
import { LocalizerType } from '../../types/Util';
import * as Errors from '../../types/errors';
import * as log from '../../logging/log';
export type Props = {
i18n: LocalizerType;
@@ -27,7 +28,7 @@ export class ErrorBoundary extends React.PureComponent<Props, State> {
}
public static getDerivedStateFromError(error: Error): State {
window.log.error(
log.error(
'ErrorBoundary: captured rendering error',
Errors.toLogFormat(error)
);