Skip to content

Commit

Permalink
Merge pull request #1 from MIGUELez11/fix-extract-fs-variable
Browse files Browse the repository at this point in the history
fix variable declaration for fs in host builtins check
  • Loading branch information
guybedford authored Nov 25, 2024
2 parents e90adec + 40e9741 commit 174f49c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ Just like with dynamic import, with a synchronous import, it's possible to check
For example, checking if host builtins are available:

```js
let fs;
try {
let fs = import.sync('node:fs');
fs = import.sync('node:fs');
} catch {}

if (fs) {
Expand Down

0 comments on commit 174f49c

Please sign in to comment.