| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent eb2dce8 commit f87ac90
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -104,7 +104,7 @@ class Worker extends EventEmitter { | |||
| 104 | 104 | filename = path.resolve(filename); | |
| 105 | 105 | ||
| 106 | 106 | const ext = path.extname(filename); | |
| 107 | - if (!/^\.[cm]?js$/.test(ext)) { | ||
| 107 | + if (ext !== '.js' && ext !== '.mjs' && ext !== '.cjs') { | ||
| 108 | 108 | throw new ERR_WORKER_UNSUPPORTED_EXTENSION(ext); | |
| 109 | 109 | } | |
| 110 | 110 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments