| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c7b898d commit 924dc90
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2528,7 +2528,7 @@ for these errors: | |||
| 2528 | 2528 | ```js | |
| 2529 | 2529 | const vm = require('node:vm'); | |
| 2530 | 2530 | const context = vm.createContext({}); | |
| 2531 | - const myError = vm.runInContext('new Error', context); | ||
| 2531 | + const myError = vm.runInContext('new Error()', context); | ||
| 2532 | 2532 | console.log(util.types.isNativeError(myError)); // true | |
| 2533 | 2533 | console.log(myError instanceof Error); // false | |
| 2534 | 2534 | ``` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments