Skip to content

Commit

Permalink
fix: googledrive: potential edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
amuwal committed Dec 23, 2024
1 parent cdd41b1 commit e101198
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,11 @@ 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) =>
Expand Down

0 comments on commit e101198

Please sign in to comment.