electricity
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -327,13 +327,15 @@ const crypto = require('crypto'); | ||
function urlBuilder(urlPath) { | ||
let file; | ||
const request = parseUrlPath(urlPath); | ||
let url = urlPath; | ||
try { | ||
file = fetchFile(request.path); | ||
} catch(err) { | ||
// If we don't have a file that matches the specified URL path simply return the original URL path | ||
return urlPath; | ||
} | ||
if (options.hashify) { | ||
try { | ||
const request = parseUrlPath(urlPath); | ||
const file = fetchFile(request.path); | ||
url = hashifyUrl(request.path, file.hash); | ||
} catch(err) { | ||
// If we don't have a file that matches the specified URL path simply return the original URL path | ||
} | ||
url = hashifyUrl(request.path, file.hash); | ||
} | ||
@@ -340,0 +342,0 @@ |
@@ -37,3 +37,3 @@ { | ||
}, | ||
"version": "3.0.2" | ||
"version": "3.0.3" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35274
383