mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-08 17:09:07 +08:00
fix some error cannot be caught due to error throw by async promise executor cannot cause promise transition to rejected status
This commit is contained in:
@@ -175,6 +175,7 @@ export async function mainLoop (hooks) {
|
||||
|
||||
try {
|
||||
const { targetJobElProxy, targetJobIndex } = await new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
// job list
|
||||
const recommendJobListElProxy = await page.$('.job-list-container .rec-job-list')
|
||||
|
||||
@@ -270,6 +271,9 @@ export async function mainLoop (hooks) {
|
||||
targetJobIndex
|
||||
}
|
||||
)
|
||||
} catch(err) {
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
if (targetJobIndex >= 0) {
|
||||
// scroll that target element into view
|
||||
|
||||
Reference in New Issue
Block a user