From ce23468b016a5880a3bd86da6ce8284a80263ff4 Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Sun, 12 Apr 2020 11:50:10 +0200 Subject: [PATCH] Minor fix to isEqual method --- src/WebAnnotation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WebAnnotation.js b/src/WebAnnotation.js index 5f02fcd..fff3099 100644 --- a/src/WebAnnotation.js +++ b/src/WebAnnotation.js @@ -22,7 +22,7 @@ export default class WebAnnotation { /** An equality check based on the underlying object or (if given) ID **/ isEqual(other) { - if (!other) { + if (!other || other?.type !== 'Annotation') { return false; } else if (this.underlying === other.underlying) { return true;