Skip to content

Commit d4e48bf

Browse files
no use ?.
1 parent 70454d1 commit d4e48bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DefaultBackend.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module.exports = class DefaultBackend {
9595
return this._cache.writeStat(filepath, size, opts)
9696
}
9797
async readFile(filepath, opts) {
98-
const encoding = typeof opts === "string" ? opts : opts?.encoding;
98+
const encoding = typeof opts === "string" ? opts : opts && opts.encoding;
9999
if (encoding && encoding !== 'utf8') throw new Error('Only "utf8" encoding is supported in readFile');
100100
let data = null, stat = null
101101
try {

0 commit comments

Comments
 (0)