I have the following code in a Redux saga:
function* providersList(action) {
yield put(LoadingActionCreators.start(Actions.PROVIDERS_LIST));
yield put(ErrorActionCreators.clear(Actions.PROVIDERS_LIST));
try {
const response = yield call(
PostRequest,
'providers/list',
{
AuthorizationKey: authorizationKey,
CustomerID: action.customerID
}
);
if (response.Message === "Success")
yield put(ProvidersActionCreators.providersListSuccess(response.Providers))
else
yield put(ErrorActionCreators.set(Actions.PROVIDERS_LIST, new Error('PROVIDERS_LIST ERROR')));
} catch (error) {
yield put(ErrorActionCreators.set(Actions.PROVIDERS_LIST, error));
}
yield put(LoadingActionCreators.end(Actions.PROVIDERS_LIST));
}
I'm using React Native debugger, and want to put a breakpoint at the if (response.Message === "Success")
line. The debugger won't let me do this though. If I click to put the breakpoint there, it instead puts it above at the line function* providersList(action)
.
Can anyone help me understand why this is?