Skip to content

Commit

Permalink
chore: fix typo (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
is2ei committed May 21, 2022
1 parent f2def41 commit c758497
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -195,7 +195,7 @@ async function fastifyStatic (fastify, opts) {

stream.on('error', function (err) {
if (err.code === 'ENOENT') {
// when preCompress is enabled and the path is a directoy without a trailing shash
// when preCompress is enabled and the path is a directory without a trailing slash
if (opts.preCompressed && encoding) {
const indexPathname = findIndexFile(pathname, options.root, options.index)
if (indexPathname) {
Expand Down Expand Up @@ -494,7 +494,7 @@ function getEncodingExtension (encoding) {

function getRedirectUrl (url) {
let i = 0
// we detech how many slash before a valid path
// we detect how many slash before a valid path
for (i; i < url.length; i++) {
if (url[i] !== '/' && url[i] !== '\\') break
}
Expand Down

0 comments on commit c758497

Please sign in to comment.