Skip to content

Commit dca70f8

Browse files
committed
Ensure 0.16-like put()-exception swallowing.
1 parent 6fa174e commit dca70f8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/saga.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,22 @@ function * loader (action) {
2424
response
2525
}
2626

27-
yield put(responseAction)
27+
try {
28+
yield put(responseAction)
29+
} catch (e) {
30+
// redux-saga v0.16 swallows put() exceptions
31+
}
2832
} catch (error) {
2933
const errorAction = {
3034
...responseObject,
3135
type: FAILURE,
3236
error
3337
}
3438

35-
yield put(errorAction)
39+
try {
40+
yield put(errorAction)
41+
} catch (e) {
42+
// redux-saga v0.16 swallows put() exceptions
43+
}
3644
}
3745
}

0 commit comments

Comments
 (0)