mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-08 17:09:07 +08:00
add waitForFunction to fix chat list might be undefined
This commit is contained in:
@@ -183,6 +183,9 @@ const mainLoop = async () => {
|
|||||||
|
|
||||||
// eslint-disable-next-line no-constant-condition
|
// eslint-disable-next-line no-constant-condition
|
||||||
while (true) {
|
while (true) {
|
||||||
|
await pageMapByName.boss?.waitForFunction(() => {
|
||||||
|
return Array.isArray(document.querySelector('.main-wrap .chat-user')?.__vue__?.list)
|
||||||
|
})
|
||||||
// find target boss - with unread icon, or recommend system message
|
// find target boss - with unread icon, or recommend system message
|
||||||
const friendListData = (await pageMapByName.boss!.evaluate(
|
const friendListData = (await pageMapByName.boss!.evaluate(
|
||||||
`
|
`
|
||||||
|
|||||||
Reference in New Issue
Block a user