Import log instead of using it off of window
This commit is contained in:
parent
8eb0dd3116
commit
65ddf0a9e8
155 changed files with 3654 additions and 3433 deletions
|
@ -19,6 +19,7 @@ import { usePrevious } from '../../util/hooks';
|
|||
import { missingCaseError } from '../../util/missingCaseError';
|
||||
import { Tooltip, TooltipPlacement } from '../Tooltip';
|
||||
import type { TimelineItemType } from './TimelineItem';
|
||||
import * as log from '../../logging/log';
|
||||
|
||||
export type PropsActionsType = {
|
||||
messageSizeChanged: (messageId: string, conversationId: string) => void;
|
||||
|
@ -66,9 +67,7 @@ export const CallingNotification: React.FC<PropsType> = React.memo(props => {
|
|||
timestamp = props.startedTime;
|
||||
break;
|
||||
default:
|
||||
window.log.error(
|
||||
`CallingNotification missing case: ${missingCaseError(props)}`
|
||||
);
|
||||
log.error(`CallingNotification missing case: ${missingCaseError(props)}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -79,7 +78,7 @@ export const CallingNotification: React.FC<PropsType> = React.memo(props => {
|
|||
bounds
|
||||
onResize={({ bounds }) => {
|
||||
if (!bounds) {
|
||||
window.log.error('We should be measuring the bounds');
|
||||
log.error('We should be measuring the bounds');
|
||||
return;
|
||||
}
|
||||
setHeight(bounds.height);
|
||||
|
@ -173,7 +172,7 @@ function renderCallingNotificationButton(
|
|||
break;
|
||||
}
|
||||
default:
|
||||
window.log.error(missingCaseError(props));
|
||||
log.error(missingCaseError(props));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue