Skip to content

Commit dfecc61

Browse files
committed
fix(GoogleDrive): Try to fix "T.includes is not a function" error
Signed-off-by: Marcel Klehr <[email protected]>
1 parent 5c6b82f commit dfecc61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/adapters/GoogleDrive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,12 @@ export default class GoogleDriveAdapter extends CachingAdapter {
231231
}
232232
}
233233

234-
if (file) {
234+
if (file && file.id) {
235235
this.fileId = file.id
236236
if (forceLock) {
237237
this.locked = await this.setLock(this.fileId)
238238
} else if (needLock) {
239-
const data = await this.getFileMetadata(file.id, 'appProperties')
239+
const data = await this.getFileMetadata(this.fileId, 'appProperties')
240240
if (data.appProperties && data.appProperties.locked && (data.appProperties.locked === true || JSON.parse(data.appProperties.locked))) {
241241
const lockedDate = JSON.parse(data.appProperties.locked)
242242
if (!Number.isInteger(lockedDate)) {

0 commit comments

Comments
 (0)