| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e4d9585 commit 4046280
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2539,7 +2539,7 @@ for these errors: | |||
| 2539 | 2539 | ```js | |
| 2540 | 2540 | const vm = require('node:vm'); | |
| 2541 | 2541 | const context = vm.createContext({}); | |
| 2542 | - const myError = vm.runInContext('new Error', context); | ||
| 2542 | + const myError = vm.runInContext('new Error()', context); | ||
| 2543 | 2543 | console.log(util.types.isNativeError(myError)); // true | |
| 2544 | 2544 | console.log(myError instanceof Error); // false | |
| 2545 | 2545 | ``` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments