Skip to content

Commit

Permalink
Fix: make toggleCursor in regions.js safe
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Byassee committed Jan 23, 2024
1 parent f7292ec commit 7fe7139
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/regions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class SingleRegion extends EventEmitter<RegionEvents> {
}

private toggleCursor(toggle: boolean) {
if (!this.drag) return
if (!this.drag || !this.element?.style) return
this.element.style.cursor = toggle ? 'grabbing' : 'grab'
}

Expand Down

0 comments on commit 7fe7139

Please sign in to comment.