Skip to content

Commit

Permalink
lib: use let instead of var
Browse files Browse the repository at this point in the history
use let instead of var for lib/internal/policy/manifest.js
PR-URL: #30424
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
edspace authored and gireeshpunathil committed Nov 25, 2019
1 parent 364ddd8 commit dfbdfb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/internal/policy/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Manifest {
const manifestEntries = entries(obj.resources);

const parsedURLs = new SafeMap();
for (var i = 0; i < manifestEntries.length; i++) {
for (let i = 0; i < manifestEntries.length; i++) {
let resourceHREF = manifestEntries[i][0];
const originalHREF = resourceHREF;
let resourceURL;
Expand Down Expand Up @@ -105,8 +105,8 @@ class Manifest {
mismatch = true;
} else {
compare:
for (var sriI = 0; sriI < sri.length; sriI++) {
for (var oldI = 0; oldI < old.length; oldI++) {
for (let sriI = 0; sriI < sri.length; sriI++) {
for (let oldI = 0; oldI < old.length; oldI++) {
if (sri[sriI].algorithm === old[oldI].algorithm &&
BufferEquals(sri[sriI].value, old[oldI].value) &&
sri[sriI].options === old[oldI].options) {
Expand Down Expand Up @@ -205,7 +205,7 @@ class Manifest {
const integrityEntries = integrities.get(href);
if (integrityEntries === true) return true;
// Avoid clobbered Symbol.iterator
for (var i = 0; i < integrityEntries.length; i++) {
for (let i = 0; i < integrityEntries.length; i++) {
const {
algorithm,
value: expected
Expand Down

0 comments on commit dfbdfb4

Please sign in to comment.