From c758497bd90137714f76ae2fc8c1e171dcde6f00 Mon Sep 17 00:00:00 2001 From: Horie Issei Date: Sat, 21 May 2022 19:07:29 +0900 Subject: [PATCH] chore: fix typo (#306) --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9e3fe0b..35ab8d4 100644 --- a/index.js +++ b/index.js @@ -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) { @@ -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 }