From 1faf0428eaff25593c2d7d9200f6c3eef19ff01d Mon Sep 17 00:00:00 2001 From: Mohammed Keyvanzadeh Date: Wed, 12 Jan 2022 01:17:53 +0330 Subject: [PATCH] policy: replace entries with keys Replaced the entries with keys since the values of the entries are not used, and changed loop style to avoid mangled `Symbol.iterator`s and to keep consistency. --- lib/internal/policy/manifest.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/internal/policy/manifest.js b/lib/internal/policy/manifest.js index e278e787db9257..61ee55d3a45637 100644 --- a/lib/internal/policy/manifest.js +++ b/lib/internal/policy/manifest.js @@ -130,7 +130,9 @@ class DependencyMapperInstance { this.#patternDependencies = undefined; } else { const patterns = []; - for (const { 0: key } of ObjectEntries(dependencies)) { + const keys = ObjectKeys(dependencies); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; if (StringPrototypeEndsWith(key, '*')) { const target = RegExpPrototypeExec(/^([^*]*)\*([^*]*)$/); if (!target) {