Skip to content

Commit

Permalink
still run on non-node envs (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh authored Oct 15, 2024
1 parent ea7783b commit 1b992ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const MAX_WRITE = 16 * 1024
const kContentModeBuffer = 'buffer'
const kContentModeUtf8 = 'utf8'

const [major, minor] = process.versions.node.split('.').map(Number)
const [major, minor] = (process.versions.node || '0.0').split('.').map(Number)
const kCopyBuffer = major >= 22 && minor >= 7

function openFile (file, sonic) {
Expand Down

0 comments on commit 1b992ac

Please sign in to comment.