Skip to content

Commit f9afe31

Browse files
committed
fix(GoogleDrive|WebDAV): fix _.includes is not a function error
Signed-off-by: Marcel Klehr <[email protected]>
1 parent 2e430be commit f9afe31

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib/adapters/GoogleDrive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export default class GoogleDriveAdapter extends CachingAdapter {
264264
throw new DecryptionError()
265265
}
266266
}
267-
} else if (!xmlDocText.includes('<?xml version="1.0" encoding="UTF-8"?>')) {
267+
} else if (!xmlDocText || !xmlDocText.includes('<?xml version="1.0" encoding="UTF-8"?>')) {
268268
throw new FileUnreadableError()
269269
}
270270

src/lib/adapters/WebDav.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export default class WebDavAdapter extends CachingAdapter {
227227
throw new DecryptionError()
228228
}
229229
}
230-
} else if (!xmlDocText.includes('<?xml version="1.0" encoding="UTF-8"?>') && !xmlDocText.includes('<!DOCTYPE NETSCAPE-Bookmark-file-1>')) {
230+
} else if (!xmlDocText || (!xmlDocText.includes('<?xml version="1.0" encoding="UTF-8"?>') && !xmlDocText.includes('<!DOCTYPE NETSCAPE-Bookmark-file-1>'))) {
231231
throw new FileUnreadableError()
232232
}
233233

0 commit comments

Comments
 (0)