|
1 | 1 | import { BrowserWindow, screen } from 'electron' |
2 | 2 | import { EventEmitter } from 'events' |
3 | 3 | import { ConfigWindow, ConfigWindowAllowedWebHIDDevice, ConfigWindowShared } from '../lib/config' |
4 | | -import _ = require('underscore') |
| 4 | +import { isEqual } from 'underscore' |
5 | 5 | import { Logger } from '../lib/logging' |
6 | 6 | import { ReportStatusIpcPayload, StatusCode, StatusObject } from '../lib/api' |
7 | 7 | import * as path from 'path' |
8 | | -import urlJoin = require('url-join') |
| 8 | +import urlJoin from 'url-join' |
9 | 9 | import { Queue } from '../lib/queue' |
10 | 10 | import { CrashRecovery } from '../lib/crashRecovery' |
11 | 11 |
|
@@ -172,7 +172,7 @@ export class WindowHelper extends EventEmitter { |
172 | 172 | this._sharedConfig = sharedConfig |
173 | 173 | this._config = config |
174 | 174 |
|
175 | | - if (!_.isEqual(oldConfig, config)) { |
| 175 | + if (!isEqual(oldConfig, config)) { |
176 | 176 | await this._updateWindow(oldConfig) |
177 | 177 | } |
178 | 178 | } |
@@ -397,15 +397,9 @@ export class WindowHelper extends EventEmitter { |
397 | 397 |
|
398 | 398 | this.crashRecovery.notifyCrash() |
399 | 399 | } |
400 | | - private _handleConsoleMessage = ( |
401 | | - _event: Electron.Event, |
402 | | - level: number, |
403 | | - message: string, |
404 | | - line: number, |
405 | | - sourceId: string |
406 | | - ): void => { |
| 400 | + private _handleConsoleMessage = (event: Electron.Event<Electron.WebContentsConsoleMessageEventParams>): void => { |
407 | 401 | if (this.config.logContent) { |
408 | | - const logMessage = `[${level}] ${message} at ${sourceId}:${line}` |
| 402 | + const logMessage = `[${event.level}] ${event.message} at ${event.sourceId}:${event.lineNumber}` |
409 | 403 | this.logger.debug(`${this.id}: ${logMessage}`) |
410 | 404 | } |
411 | 405 | } |
|
0 commit comments