Skip to content

Commit

Permalink
fix: add optional chaining to prevent error (binary-com#9838)
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-hosseini-deriv authored and vinu-deriv committed Sep 1, 2023
1 parent 141f833 commit 7154833
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/Stores/pushwoosh-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class PushwooshStore extends BaseStore {
sendTags = api => {
api.getTags()
.then(result => {
if (!result.result['Login ID'] || !result.result['Site Language'] || !result.result.Residence) {
if (!result?.result?.['Login ID'] || !result?.result?.['Site Language'] || !result?.result?.Residence) {
return api.setTags({
'Login ID': this.root_store.client.loginid,
'Site Language': getLanguage().toLowerCase(),
Expand Down

0 comments on commit 7154833

Please sign in to comment.