Skip to content

Commit 02b7553

Browse files
committed
fix(WebDAV): Fix includes is not a function error
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 1964be5 commit 02b7553

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/adapters/WebDav.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export default class WebDavAdapter extends CachingAdapter {
221221
xmlDocText = await Crypto.decryptAES(this.server.passphrase, xmlDocText, this.server.bookmark_file)
222222
}
223223
} catch (e) {
224-
if (xmlDocText.includes('<?xml version="1.0" encoding="UTF-8"?>') || xmlDocText.includes('<!DOCTYPE NETSCAPE-Bookmark-file-1>')) {
224+
if (xmlDocText && (xmlDocText.includes('<?xml version="1.0" encoding="UTF-8"?>') || xmlDocText.includes('<!DOCTYPE NETSCAPE-Bookmark-file-1>'))) {
225225
// not encrypted, yet => noop
226226
} else {
227227
throw new DecryptionError()

0 commit comments

Comments
 (0)