Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit

Permalink
Do not hide annotations actions dialog if action is failed (#8751)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored Nov 28, 2024
1 parent 4f7391d commit 9581b07
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -583,14 +583,15 @@ function AnnotationsActionsModalContent(props: Props): JSX.Element {
if (!cancellationRef.current) {
canvasInstance.setup(frameData, []);
storage.dispatch(fetchAnnotationsAsync());
if (isMounted()) {
if (targetObjectState !== null) {
onClose();
}
}
}
}).finally(() => {
if (isMounted()) {
if (targetObjectState !== null) {
onClose();
} else {
dispatch(reducerActions.resetAfterRun());
}
dispatch(reducerActions.resetAfterRun());
}
}).catch((error: unknown) => {
if (error instanceof Error) {
Expand Down

0 comments on commit 9581b07

Please sign in to comment.