From 8e8bb04f5fbf46024c1a62dfa11c93f31255563b Mon Sep 17 00:00:00 2001 From: KarishmaGhiya Date: Wed, 8 Jul 2020 14:35:46 -0700 Subject: [PATCH] fixing the logic to add to the common-versions.json (#9967) --- eng/tools/dependency-testing/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/tools/dependency-testing/index.js b/eng/tools/dependency-testing/index.js index 136d70b03213..89ceb474d8b2 100644 --- a/eng/tools/dependency-testing/index.js +++ b/eng/tools/dependency-testing/index.js @@ -304,7 +304,7 @@ async function updateCommonVersions(repoRoot, allowedVersionList) { if (allowedVersionList[package] && !allowedAlternativeVersions[package]) { allowedAlternativeVersions[package] = [allowedVersionList[package]]; } - else if (allowedVersionList[package] && allowedAlternativeVersions[package].includes(allowedVersionList[package])) { + else if (allowedVersionList[package] && !allowedAlternativeVersions[package].includes(allowedVersionList[package])) { allowedAlternativeVersions[package].push(allowedVersionList[package]); } }