Skip to content

Commit

Permalink
Fix no-prototype-builtins error
Browse files Browse the repository at this point in the history
This fix doesn't seem to break anything, though I'll admit it's straight off stackoverflow.
  • Loading branch information
domoscargin committed Dec 2, 2022
1 parent 83e1cd5 commit d136633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/file-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ exports.getFingerprint = function (file) {
// with a forward slashes.
const relativeFile = path.join(filePath, file).replace(/\\/g, '/')

if (fingerprints.hasOwnProperty(relativeFile)) {
if (Object.prototype.hasOwnProperty.call(fingerprints, relativeFile)) {
return '/' + fingerprints[relativeFile]
}
}

// Look for a fingerprinted asset at this path relative to the site root
if (fingerprints.hasOwnProperty(file)) {
if (Object.prototype.hasOwnProperty.call(fingerprints, file)) {
return '/' + fingerprints[file]
}

Expand Down

0 comments on commit d136633

Please sign in to comment.