Skip to content

Commit

Permalink
[Bugfix] Don't leave the saga on nested alerts prevention
Browse files Browse the repository at this point in the history
  • Loading branch information
itinance committed Jan 29, 2019
1 parent fde42d0 commit 8e7b910
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redux-saga-rn-alert",
"version": "1.2.6",
"version": "1.2.7",
"description": "Alert-support for sagas and side-effects",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion saga/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function * watchAlertChannel() {
case ACTION_SHOW_ALERT:
const {message, title, buttons, options} = action.payload;

if(_alertIsRunning && _preventNestedAlerts) return; // prevent nested alerts
if(_alertIsRunning && _preventNestedAlerts) break; // prevent nested alerts
_alertIsRunning = true;

Alert.alert(title, message, buttons, options)
Expand Down

0 comments on commit 8e7b910

Please sign in to comment.