Skip to content

Commit d2a9579

Browse files
committed
Address style issues and additional bug identified by coderabbitai
1 parent 8af0d01 commit d2a9579

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/google_calendar/sources/new-or-updated-event-instant/new-or-updated-event-instant.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ export default {
201201
},
202202
getCalendarIdForChannelId(incomingChannelId) {
203203
for (const calendarId of this.calendarIds) {
204-
const channelId = this.db.get(`${calendarId}.channelId`);
205204
if (this.db.get(`${calendarId}.channelId`) === incomingChannelId) {
206205
return calendarId;
207206
}
@@ -255,7 +254,9 @@ export default {
255254
}
256255

257256
// Fetch and emit events
258-
const checkCalendarIds = calendarId ? [ calendarId ] : this.calendarIds;
257+
const checkCalendarIds = calendarId
258+
? [calendarId]
259+
: this.calendarIds;
259260
for (const calendarId of checkCalendarIds) {
260261
const syncToken = this.getNextSyncToken(calendarId);
261262
let nextSyncToken = null;
@@ -274,7 +275,7 @@ export default {
274275
});
275276
if (syncStatus === 410) {
276277
console.log("Sync token invalid, resyncing");
277-
nextSyncToken = await this.googleCalendar.fullSync(this.calendarId);
278+
nextSyncToken = await this.googleCalendar.fullSync(calendarId);
278279
break;
279280
}
280281
nextPageToken = syncData.nextPageToken;

0 commit comments

Comments
 (0)