mirror of
https://github.com/lenalebt/obsidian-pocketbook-cloud-highlight-importer.git
synced 2026-07-22 07:40:24 +00:00
adding safe navigation for books without quotes
This commit is contained in:
parent
b37b2e9036
commit
825e5d5045
1 changed files with 2 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ export class PocketbookCloudHighlightsImporter {
|
|||
// if sorting works, fine. if not, also fine, using date then.
|
||||
highlights.sort((a, b) => CFI.compare(this.cfi(a.quotation.begin), this.cfi(b.quotation.begin)));
|
||||
} catch (e) {
|
||||
highlights.sort((a, b) => +a.quotation.updated - +b.quotation.updated);
|
||||
highlights.sort((a, b) => +a.quotation?.updated - +b.quotation?.updated);
|
||||
}
|
||||
|
||||
let i = 0;
|
||||
|
|
@ -97,7 +97,7 @@ export class PocketbookCloudHighlightsImporter {
|
|||
begin: highlight.quotation?.begin ?? '',
|
||||
end: highlight.quotation?.end ?? '',
|
||||
},
|
||||
updated: highlight.quotation.updated,
|
||||
updated: highlight.quotation?.updated,
|
||||
type: 'highlight',
|
||||
plugin: 'pocketbook-cloud-highlights-importer',
|
||||
sort_order: i,
|
||||
|
|
|
|||
Loading…
Reference in a new issue