Object.entries => Object.keys
@@ -127,8 +127,8 @@ if (__DEV__) {
optimisticResponse: Object,
context: ValidationContext,
) => {
- Object.entries(optimisticResponse).forEach(
- ([key, value]: [string, mixed]) => {
+ Object.keys(optimisticResponse).forEach((key: string) => {
+ const value = optimisticResponse[key];
const path = `${context.path}.${key}`;
if (!context.visitedPaths.has(path)) {
warning(
@@ -145,8 +145,7 @@ if (__DEV__) {
path,
});
}
- },
- );
+ });
};
}
