Skip to content

Commit

Permalink
fix(WebDAV): Fix includes is not a function error
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Jan 6, 2025
1 parent 1964be5 commit 02b7553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/adapters/WebDav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export default class WebDavAdapter extends CachingAdapter {
xmlDocText = await Crypto.decryptAES(this.server.passphrase, xmlDocText, this.server.bookmark_file)
}
} catch (e) {
if (xmlDocText.includes('<?xml version="1.0" encoding="UTF-8"?>') || xmlDocText.includes('<!DOCTYPE NETSCAPE-Bookmark-file-1>')) {
if (xmlDocText && (xmlDocText.includes('<?xml version="1.0" encoding="UTF-8"?>') || xmlDocText.includes('<!DOCTYPE NETSCAPE-Bookmark-file-1>'))) {
// not encrypted, yet => noop
} else {
throw new DecryptionError()
Expand Down

0 comments on commit 02b7553

Please sign in to comment.