Skip to content

Commit

Permalink
refactor getHashedAsset
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Feb 4, 2024
1 parent b03ff10 commit 07b0244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ async function fastifyStatic (fastify, opts) {
const relativeDirectory = path.posix.dirname(unhashedRelativePath)
const fileName = path.basename(unhashedRelativePath)
const hash = fastify[kFileHashes].get(unhashedRelativePath)
return `${prefix}${relativeDirectory === '.' ? '' : relativeDirectory}${hash ?? ''}${fileName}`
return `${prefix}${relativeDirectory === '.' ? '' : `${relativeDirectory}/`}${hash ?? ''}${fileName}`
}
}

Expand Down

0 comments on commit 07b0244

Please sign in to comment.