Skip to content

Commit

Permalink
Null handling on privacy policy and tos pages
Browse files Browse the repository at this point in the history
  • Loading branch information
stever committed Jun 27, 2023
1 parent 93312d3 commit a74fa31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/web/src/redux/app/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ function* handleRequestTermsOfUseActions(_) {
const response = yield call(gqlFetch, userId, query, variables);
console.assert(response?.data?.text, response);
console.assert(response?.data?.text.length === 1, response);
console.assert(response?.data?.text[0].text, response);
yield put(receiveTermsOfUse(response.data.text[0].text));
console.assert(response?.data?.text[0]?.text, response);
yield put(receiveTermsOfUse(response?.data?.text[0]?.text || '# Terms of Use\n\nTODO'));
} catch (e) {
handleException(e);
}
Expand All @@ -110,8 +110,8 @@ function* handleRequestPrivacyPolicyActions(_) {
const response = yield call(gqlFetch, userId, query, variables);
console.assert(response?.data?.text, response);
console.assert(response?.data?.text.length === 1, response);
console.assert(response?.data?.text[0].text, response);
yield put(receivePrivacyPolicy(response.data.text[0].text));
console.assert(response?.data?.text[0]?.text, response);
yield put(receivePrivacyPolicy(response?.data?.text[0]?.text || '# Privacy Policy\n\nTODO'));
} catch (e) {
handleException(e);
}
Expand Down

0 comments on commit a74fa31

Please sign in to comment.