Skip to content

Commit e11451c

Browse files
VoltrexKeyvaBethGriggs
authored andcommitted
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. PR-URL: #41482 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 5e3f751 commit e11451c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/internal/policy/manifest.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ class DependencyMapperInstance {
130130
this.#patternDependencies = undefined;
131131
} else {
132132
const patterns = [];
133-
for (const { 0: key } of ObjectEntries(dependencies)) {
133+
const keys = ObjectKeys(dependencies);
134+
for (let i = 0; i < keys.length; i++) {
135+
const key = keys[i];
134136
if (StringPrototypeEndsWith(key, '*')) {
135137
const target = RegExpPrototypeExec(/^([^*]*)\*([^*]*)$/);
136138
if (!target) {

0 commit comments

Comments
 (0)