Skip to content

Commit

Permalink
fix(fs): avoid throwing exception in node check conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak committed Nov 29, 2023
1 parent f05a48c commit 9f951f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/shim/fs.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let fs;
if (process?.versions?.node !== null) {
if (typeof process !== 'undefined' && process?.versions?.node !== null) {
fs = require('fs');
}

Expand Down

0 comments on commit 9f951f8

Please sign in to comment.