Update app.mjs
Browse files
app.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import pluginStealth from 'puppeteer-extra-plugin-stealth'
|
|
| 14 |
const TIMEOUT_MS = 6e4
|
| 15 |
const MAX_CODE_LENGTH = 6e4
|
| 16 |
|
| 17 |
-
|
| 18 |
const AsyncFunction = Object.getPrototypeOf(async () => {}).constructor
|
| 19 |
parentPort.on('message', async (code) => {
|
| 20 |
try {
|
|
@@ -24,8 +24,8 @@ if (!isMainThread) {
|
|
| 24 |
parentPort.postMessage({ error: format(error) })
|
| 25 |
}
|
| 26 |
})
|
| 27 |
-
return
|
| 28 |
-
}
|
| 29 |
|
| 30 |
const isNumber = (v) => typeof v === 'number' && !isNaN(v)
|
| 31 |
|
|
|
|
| 14 |
const TIMEOUT_MS = 6e4
|
| 15 |
const MAX_CODE_LENGTH = 6e4
|
| 16 |
|
| 17 |
+
!isMainThread && (async () => {
|
| 18 |
const AsyncFunction = Object.getPrototypeOf(async () => {}).constructor
|
| 19 |
parentPort.on('message', async (code) => {
|
| 20 |
try {
|
|
|
|
| 24 |
parentPort.postMessage({ error: format(error) })
|
| 25 |
}
|
| 26 |
})
|
| 27 |
+
return 1
|
| 28 |
+
})();
|
| 29 |
|
| 30 |
const isNumber = (v) => typeof v === 'number' && !isNaN(v)
|
| 31 |
|