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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
edspace authored and addaleax committed Nov 30, 2019
1 parent 708e67a commit 3c041ed
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 3c041ed

Please sign in to comment.