Skip to content

Commit

Permalink
change nullish coalescing to a direct null check
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuspoehls committed Mar 16, 2024
1 parent 071ae17 commit e85276e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [3.4.2](https://github.com/supercharge/fs/compare/v3.4.1...v3.4.2) - 2024-03-16

### Fixed
- fix failing test on Node.js v12 by changing the nullish coalescing to a direct null check


## [3.4.1](https://github.com/supercharge/fs/compare/v3.4.0...v3.4.1) - 2024-03-09

### Updated
Expand Down
2 changes: 1 addition & 1 deletion src/filesystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default Object.assign({}, Fs, {
console.log('"Fs.readFile(file)" to retrieve the file’s content as string is deprecated. Use "Fs.content(file)" instead.')
}

return await Fs.readFile(file, encoding ?? 'utf8')
return await Fs.readFile(file, encoding == null ? 'utf8' : encoding)
},

/**
Expand Down

0 comments on commit e85276e

Please sign in to comment.