diff --git a/lib/internal/http2/util.js b/lib/internal/http2/util.js index d069f726db7795..9025850469de7a 100644 --- a/lib/internal/http2/util.js +++ b/lib/internal/http2/util.js @@ -542,7 +542,7 @@ const assertWithinRange = hideStackFrames( function toHeaderObject(headers) { const obj = ObjectCreate(null); - for (var n = 0; n < headers.length; n = n + 2) { + for (var n = 0; n < headers.length; n += 2) { const name = headers[n]; let value = headers[n + 1]; if (name === HTTP2_HEADER_STATUS) diff --git a/lib/internal/policy/sri.js b/lib/internal/policy/sri.js index c4b5e7f1ca209a..ddb06a2e1a6051 100644 --- a/lib/internal/policy/sri.js +++ b/lib/internal/policy/sri.js @@ -58,7 +58,7 @@ const parse = (str) => { options: match[4] === undefined ? null : match[4], }) }); - prevIndex = prevIndex + match[0].length; + prevIndex += match[0].length; } if (prevIndex !== str.length) {