var -> let

This commit is contained in:
Matt Bierner
2018-10-04 13:55:56 -07:00
parent 38886a08c6
commit 8ecebfb761
5 changed files with 23 additions and 23 deletions

View File

@@ -321,7 +321,7 @@ function transportCSS(module: string, enqueue: (module: string) => void, write:
function _replaceURL(contents: string, replacer: (url: string) => string): string {
// Use ")" as the terminator as quotes are oftentimes not used at all
return contents.replace(/url\(\s*([^\)]+)\s*\)?/g, (_: string, ...matches: string[]) => {
var url = matches[0];
let url = matches[0];
// Eliminate starting quotes (the initial whitespace is not captured)
if (url.charAt(0) === '"' || url.charAt(0) === '\'') {
url = url.substring(1);