Skip to content

Commit 5ba6e8b

Browse files
committed
fix: undefined error when deselecting regions if not regions drawn
1 parent b89fba7 commit 5ba6e8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Annotator/reducers/general-reducer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ export default (state: MainLayoutState, action: Action) => {
539539
}
540540
// Close any open boxes
541541
const regions: any = activeImage.regions
542-
if (regions.some((r) => r.editingLabels)) {
542+
if (regions && regions.some((r) => r.editingLabels)) {
543543
return setIn(
544544
state,
545545
[...pathToActiveImage, "regions"],

0 commit comments

Comments
 (0)