mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-22 14:09:46 +03:00
fix #1382 - React Native - Hermes Engine doesn't handle for await
very well - run prettier
This commit is contained in:
parent
6a4e1d3f00
commit
ecdcb2039f
|
@ -17,8 +17,8 @@ import {
|
||||||
LiftedAction,
|
LiftedAction,
|
||||||
LiftedState,
|
LiftedState,
|
||||||
PerformAction,
|
PerformAction,
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
} from '@redux-devtools/instrument';
|
} from '@redux-devtools/instrument';
|
||||||
import {
|
import {
|
||||||
ActionCreatorObject,
|
ActionCreatorObject,
|
||||||
|
@ -32,8 +32,8 @@ import {
|
||||||
filterState,
|
filterState,
|
||||||
LocalFilter,
|
LocalFilter,
|
||||||
State,
|
State,
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
} from '@redux-devtools/utils';
|
} from '@redux-devtools/utils';
|
||||||
|
|
||||||
function async(fn: () => unknown) {
|
function async(fn: () => unknown) {
|
||||||
|
@ -411,7 +411,7 @@ class DevToolsEnhancer<S, A extends Action<unknown>> {
|
||||||
const consumer = this.socket!.listener(channelName).createConsumer();
|
const consumer = this.socket!.listener(channelName).createConsumer();
|
||||||
// eslint-disable-next-line no-constant-condition
|
// eslint-disable-next-line no-constant-condition
|
||||||
while (true) {
|
while (true) {
|
||||||
const {value: data, done} = await consumer.next();
|
const { value: data, done } = await consumer.next();
|
||||||
if (done) break;
|
if (done) break;
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -450,8 +450,8 @@ class DevToolsEnhancer<S, A extends Action<unknown>> {
|
||||||
const consumer = this.socket!.listener('error').createConsumer();
|
const consumer = this.socket!.listener('error').createConsumer();
|
||||||
// eslint-disable-next-line no-constant-condition
|
// eslint-disable-next-line no-constant-condition
|
||||||
while (true) {
|
while (true) {
|
||||||
const {value: data, done} = await consumer.next();
|
const { value: data, done } = await consumer.next();
|
||||||
if (done) break; // if we've already had this error before, increment it's counter, otherwise assign it '1' since we've had the error once.
|
if (done) break; // 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,@typescript-eslint/no-unsafe-argument
|
// eslint-disable-next-line no-prototype-builtins,@typescript-eslint/no-unsafe-argument
|
||||||
this.errorCounts[data.error.name] = this.errorCounts.hasOwnProperty(
|
this.errorCounts[data.error.name] = this.errorCounts.hasOwnProperty(
|
||||||
data.error.name
|
data.error.name
|
||||||
|
@ -479,7 +479,7 @@ class DevToolsEnhancer<S, A extends Action<unknown>> {
|
||||||
const consumer = this.socket!.listener('connect').createConsumer();
|
const consumer = this.socket!.listener('connect').createConsumer();
|
||||||
// eslint-disable-next-line no-constant-condition
|
// eslint-disable-next-line no-constant-condition
|
||||||
while (true) {
|
while (true) {
|
||||||
const {done} = await consumer.next();
|
const { done } = await consumer.next();
|
||||||
if (done) break;
|
if (done) break;
|
||||||
console.log('connected to remotedev-server');
|
console.log('connected to remotedev-server');
|
||||||
this.errorCounts = {}; // clear the errorCounts object, so that we'll log any new errors in the event of a disconnect
|
this.errorCounts = {}; // clear the errorCounts object, so that we'll log any new errors in the event of a disconnect
|
||||||
|
@ -490,7 +490,7 @@ class DevToolsEnhancer<S, A extends Action<unknown>> {
|
||||||
const consumer = this.socket!.listener('disconnect').createConsumer();
|
const consumer = this.socket!.listener('disconnect').createConsumer();
|
||||||
// eslint-disable-next-line no-constant-condition
|
// eslint-disable-next-line no-constant-condition
|
||||||
while (true) {
|
while (true) {
|
||||||
const {done} = await consumer.next();
|
const { done } = await consumer.next();
|
||||||
if (done) break;
|
if (done) break;
|
||||||
this.stop(true);
|
this.stop(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user