Skip to content

Commit

Permalink
Fix annotation retrieval in CrosshairsTool.
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi committed Nov 13, 2023
1 parent 0eebeb9 commit 3730326
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/tools/src/tools/CrosshairsTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,8 @@ class CrosshairsTool extends AnnotationTool {

_getAnnotations = (enabledElement: Types.IEnabledElement) => {
const { viewport } = enabledElement;
const annotations = getAnnotations(this.getToolName(), viewport.element);
const annotations =
getAnnotations(this.getToolName(), viewport.element) || [];
const viewportIds = this._getViewportsInfo().map(
({ viewportId }) => viewportId
);
Expand Down

0 comments on commit 3730326

Please sign in to comment.