Made equality check stricter, so annotation updates can be injected via API

This commit is contained in:
Rainer Simon 2021-08-12 14:30:59 +02:00
parent 6f68fc63fd
commit 56ca3a74d8
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ export default class Editor extends Component {
const { selectionBounds } = this.state;
const nextBounds = bounds(next.selectedElement);
if (this.props.annotation?.id !== next.annotation.id) {
if (!this.props.annotation?.isEqual(next.annotation)) {
this.setState({
currentAnnotation: next.annotation,
selectionBounds: nextBounds