added null safety while accessing accessToken

This commit is contained in:
noumantahir 2022-06-30 15:57:32 +05:00
parent 70425000ac
commit 575fd3fcca

View File

@ -832,7 +832,7 @@ class ApplicationContainer extends Component {
//updateing fcm token with settings; //updateing fcm token with settings;
otherAccounts.forEach((account) => { otherAccounts.forEach((account) => {
//since there can be more than one accounts, process access tokens separate //since there can be more than one accounts, process access tokens separate
const encAccessToken = account.local.accessToken; const encAccessToken = account?.local?.accessToken;
//decrypt access token //decrypt access token
let accessToken = null; let accessToken = null;
if (encAccessToken) { if (encAccessToken) {