fix undefined errors when adding a new rectangle annotation
This commit is contained in:
parent
c7ac26ab1c
commit
0e029b205d
@ -64,7 +64,7 @@ export class FileWorkloadComponent {
|
||||
}
|
||||
|
||||
public annotationIsSelected(annotation: AnnotationWrapper) {
|
||||
return this.selectedAnnotations?.find((a) => a.id === annotation.id);
|
||||
return this.selectedAnnotations?.find((a) => a?.id === annotation.id);
|
||||
}
|
||||
|
||||
public logAnnotation(annotation: AnnotationWrapper) {
|
||||
@ -140,7 +140,7 @@ export class FileWorkloadComponent {
|
||||
if (!this.selectedAnnotations || this.selectedAnnotations.length === 0) {
|
||||
return;
|
||||
}
|
||||
const elements: any[] = this._annotationsElement.nativeElement.querySelectorAll(`div[annotation-id="${this.firstSelectedAnnotation.id}"].active`);
|
||||
const elements: any[] = this._annotationsElement.nativeElement.querySelectorAll(`div[annotation-id="${this.firstSelectedAnnotation?.id}"].active`);
|
||||
FileWorkloadComponent._scrollToFirstElement(elements);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user