aripbae commited on
Commit
ff87059
·
verified ·
1 Parent(s): 3e9b237

Update app.mjs

Browse files
Files changed (1) hide show
  1. app.mjs +3 -3
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
- if (!isMainThread) {
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 AsyncFunction
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