Fix bug in remote

This commit is contained in:
Nathan Bierema 2021-11-01 22:36:29 -04:00
parent beb02ebe6d
commit 4ca780962a

View File

@ -200,7 +200,7 @@ class DevToolsEnhancer<S, A extends Action<unknown>> {
sendOn: readonly string[] | undefined; sendOn: readonly string[] | undefined;
sendOnError: number | undefined; sendOnError: number | undefined;
channel?: string; channel?: string;
errorCounts?: { [errorName: string]: number }; errorCounts: { [errorName: string]: number } = {};
lastAction?: unknown; lastAction?: unknown;
paused?: boolean; paused?: boolean;
locked?: boolean; locked?: boolean;
@ -428,12 +428,12 @@ class DevToolsEnhancer<S, A extends Action<unknown>> {
this.socket.on('error', (err) => { this.socket.on('error', (err) => {
// if we've already had this error before, increment it's counter, otherwise assign it '1' since we've had the error once. // if we've already had this error before, increment it's counter, otherwise assign it '1' since we've had the error once.
// eslint-disable-next-line no-prototype-builtins // eslint-disable-next-line no-prototype-builtins
this.errorCounts![err.name] = this.errorCounts!.hasOwnProperty(err.name) this.errorCounts[err.name] = this.errorCounts.hasOwnProperty(err.name)
? this.errorCounts![err.name] + 1 ? this.errorCounts[err.name] + 1
: 1; : 1;
if (this.suppressConnectErrors) { if (this.suppressConnectErrors) {
if (this.errorCounts![err.name] === 1) { if (this.errorCounts[err.name] === 1) {
console.log( console.log(
'remote-redux-devtools: Socket connection errors are being suppressed. ' + 'remote-redux-devtools: Socket connection errors are being suppressed. ' +
'\n' + '\n' +