We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca555e7 commit 055db91Copy full SHA for 055db91
1 file changed
index.js
@@ -77,7 +77,7 @@ async function fastifyStatic (fastify, opts) {
77
if (opts.decorateReply !== false) {
78
fastify.decorateReply('sendFile', function (filePath, rootPath, options) {
79
const opts = typeof rootPath === 'object' ? rootPath : options
80
- const root = typeof rootPath === 'string' ? rootPath : opts && opts.root
+ const root = typeof rootPath === 'string' ? rootPath : opts?.root
81
pumpSendToReply(
82
this.request,
83
this,
0 commit comments