SonarLint Cognitive Complexity issue in given function

Viewed 15

How can i remove Cognitive Complexity from given for loop

for (const r of refcs.entries()) {
          const [key, val] = r;
          if (value.has(key)) {
            const srcKey = key;
            const tgtKey = val;

            const refValue = value.get(srcKey);
            if (refValue) value.set(tgtKey, refValue);
          }
        }
0 Answers
Related