Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
fix: cleanup transaction even if action wasn't handled
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Dec 25, 2019
1 parent 873afec commit f462d67
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/core/src/NavigationContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ const Container = React.forwardRef(function NavigationContainer(
isTransactionActiveRef.current = true;
transactionStateRef.current = navigationState;

callback();

isTransactionActiveRef.current = false;
try {
callback();
} finally {
isTransactionActiveRef.current = false;
}

return transactionStateRef.current;
});
Expand Down

0 comments on commit f462d67

Please sign in to comment.