Skip to content

Commit

Permalink
policy: replace entries with keys
Browse files Browse the repository at this point in the history
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.

PR-URL: #41482
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
VoltrexKeyva authored and danielleadams committed Feb 26, 2022
1 parent 9e7cfbb commit b8b8e0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/policy/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b8b8e0b

Please sign in to comment.