Fix undefined log function

This commit is contained in:
Fedor Indutny 2021-08-03 10:05:20 -07:00 committed by GitHub
parent 3b476fb60d
commit 6d04bfdf67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -2501,7 +2501,7 @@ export async function startApp(): Promise<void> {
window.reduxActions.app.initialLoadComplete();
window.logAppLoadedEvent({
window.logAppLoadedEvent?.({
processedCount: messageReceiver && messageReceiver.getProcessedCount(),
});
if (messageReceiver) {

View file

@ -212,7 +212,7 @@ export class SocketManager extends EventListener {
window.log.info('SocketManager: connected authenticated socket');
window.logAuthenticatedConnect();
window.logAuthenticatedConnect?.();
this.backOff.reset();
authenticated.addEventListener('close', ({ code, reason }): void => {

4
ts/window.d.ts vendored
View file

@ -482,8 +482,8 @@ declare global {
getServerTrustRoot: () => WhatIsThis;
readyForUpdates: () => void;
logAppLoadedEvent: (options: { processedCount?: number }) => void;
logAuthenticatedConnect: () => void;
logAppLoadedEvent?: (options: { processedCount?: number }) => void;
logAuthenticatedConnect?: () => void;
// Runtime Flags
isShowingModal?: boolean;