fix: resolve various tracked exceptions in ph (#3584)

* fix: handle synced bookmarks without cfi

* chore: clean up some exceptions in ph
This commit is contained in:
Huang Xin
2026-03-22 15:16:38 +08:00
committed by GitHub
parent e0cf7e8d9f
commit 1936136596
14 changed files with 43 additions and 24 deletions
@@ -333,7 +333,11 @@ const Annotator: React.FC<{ bookKey: string }> = ({ bookKey }) => {
getIndexFromCfi(booknote.cfi) === detail.index,
)
.map((annotation) => {
view?.addAnnotation(annotation);
try {
view?.addAnnotation(annotation);
} catch (err) {
console.warn('Failed to add annotation', { annotation, error: err });
}
});
};