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
|
@ -51,6 +51,7 @@ import {
|
|||
getCallSelector,
|
||||
} from './calling';
|
||||
import { getAccountSelector, AccountSelectorType } from './accounts';
|
||||
import * as log from '../../logging/log';
|
||||
|
||||
let placeholderContact: ConversationType;
|
||||
export const getPlaceholderContact = (): ConversationType => {
|
||||
|
@ -635,9 +636,7 @@ export const getConversationSelector = createSelector(
|
|||
): GetConversationByIdType => {
|
||||
return (id?: string) => {
|
||||
if (!id) {
|
||||
window.log.warn(
|
||||
`getConversationSelector: Called with a falsey id ${id}`
|
||||
);
|
||||
log.warn(`getConversationSelector: Called with a falsey id ${id}`);
|
||||
// This will return a placeholder contact
|
||||
return selector(undefined);
|
||||
}
|
||||
|
@ -659,9 +658,7 @@ export const getConversationSelector = createSelector(
|
|||
return selector(onId);
|
||||
}
|
||||
|
||||
window.log.warn(
|
||||
`getConversationSelector: No conversation found for id ${id}`
|
||||
);
|
||||
log.warn(`getConversationSelector: No conversation found for id ${id}`);
|
||||
// This will return a placeholder contact
|
||||
return selector(undefined);
|
||||
};
|
||||
|
@ -743,7 +740,7 @@ export const getContactNameColorSelector = createSelector(
|
|||
);
|
||||
const color = contactNameColors.get(contactId);
|
||||
if (!color) {
|
||||
window.log.warn(`No color generated for contact ${contactId}`);
|
||||
log.warn(`No color generated for contact ${contactId}`);
|
||||
return ContactNameColors[0];
|
||||
}
|
||||
return color;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue