From 90e86cfaae470c8b07b0f7ae8fdb8e4653f39d13 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Sun, 23 Jul 2023 10:07:58 +0200 Subject: [PATCH] [Dev] Fix `logUnequalProps` --- src/util/arePropsShallowEqual.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/arePropsShallowEqual.ts b/src/util/arePropsShallowEqual.ts index 56330a779..834d05dd6 100644 --- a/src/util/arePropsShallowEqual.ts +++ b/src/util/arePropsShallowEqual.ts @@ -38,10 +38,11 @@ export function logUnequalProps(currentProps: AnyLiteral, newProps: AnyLiteral, // eslint-disable-next-line no-console console.log(msg); - currentKeys.forEach((res, prop) => { + + for (const prop of currentKeys) { if (currentProps[prop] !== newProps[prop]) { // eslint-disable-next-line no-console console.log(debugKey, prop, ':', currentProps[prop], '=>', newProps[prop]); } - }); + } }