diff --git a/packages/api/src/filestorage/file/services/googledrive/index.ts b/packages/api/src/filestorage/file/services/googledrive/index.ts index 2f76395bc..320928b3e 100644 --- a/packages/api/src/filestorage/file/services/googledrive/index.ts +++ b/packages/api/src/filestorage/file/services/googledrive/index.ts @@ -289,15 +289,6 @@ export class GoogleDriveService implements IFileService { pageToken = nextPageToken; newRemoteCursor = newStartPageToken || nextPageToken; apiCallCount++; - - if (nextPageToken && changes.length === 0) { - // edge case where we have no changes but still have a nextPageToken - return { - filesToSync, - moreChangesToFetch: false, - remote_cursor: newRemoteCursor, - }; - } } while (pageToken && apiCallCount < maxApiCalls); return { diff --git a/packages/api/src/filestorage/folder/services/googledrive/index.ts b/packages/api/src/filestorage/folder/services/googledrive/index.ts index 3755290d1..39bf1b277 100644 --- a/packages/api/src/filestorage/folder/services/googledrive/index.ts +++ b/packages/api/src/filestorage/folder/services/googledrive/index.ts @@ -730,11 +730,6 @@ export class GoogleDriveFolderService implements IFolderService { 'nextPageToken, newStartPageToken, changes(file(id,name,mimeType,createdTime,modifiedTime,size,parents,webViewLink,driveId,trashed,permissionIds))', }); - if (!response.data.changes.length) { - // edge case where we have no changes but still have a nextPageToken - break; - } - const batchFolders = response.data.changes .filter( (change) =>