diff --git a/src/api_s2c/ApiSyncBtn.ts b/src/api_s2c/ApiSyncBtn.ts index 959eb6e..7b3308a 100644 --- a/src/api_s2c/ApiSyncBtn.ts +++ b/src/api_s2c/ApiSyncBtn.ts @@ -69,7 +69,7 @@ export default async function (call: ApiCall) { data[key] = {active: false}; } else { let zls = await G.mongodb.collection('scheduler').findOne({type: 'zhanling'}); - if (!data[key] || data[key].round != zls.round) { + if (!data[key] || data[key].round != zls?.round) { let lastRunTime = zls && zls.lastRunTime? zls.lastRunTime : G.time let round = zls && zls.lastRunTime? zls.round : 1 data[key] = {active: true, sTime: lastRunTime, round: round};