Skip to content
Permalink
Browse files

lib: use let instead of var

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 MylesBorins committed Nov 12, 2019
1 parent 9832144 commit e72be52c8eb8ab7e0b8ab57d9963dc159ee2ad8b
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/internal/policy/manifest.js
@@ -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;
@@ -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) {
@@ -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

0 comments on commit e72be52

Please sign in to comment.
You can’t perform that action at this time.