fix: Cannot read properties of undefined (reading 'always_play_audio_alert') (#7260)
This commit is contained in:
@@ -18,18 +18,18 @@ export const initializeAnalyticsEvents = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.bus.$on(ANALYTICS_RESET, () => {});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const initializeAudioAlerts = user => {
|
const initializeAudioAlerts = user => {
|
||||||
// InitializeAudioNotifications
|
|
||||||
const { ui_settings: uiSettings } = user || {};
|
const { ui_settings: uiSettings } = user || {};
|
||||||
const {
|
const {
|
||||||
always_play_audio_alert: alwaysPlayAudioAlert,
|
always_play_audio_alert: alwaysPlayAudioAlert,
|
||||||
enable_audio_alerts: audioAlertType,
|
enable_audio_alerts: audioAlertType,
|
||||||
alert_if_unread_assigned_conversation_exist: alertIfUnreadConversationExist,
|
alert_if_unread_assigned_conversation_exist: alertIfUnreadConversationExist,
|
||||||
notification_tone: audioAlertTone,
|
notification_tone: audioAlertTone,
|
||||||
} = uiSettings;
|
// UI Settings can be undefined initally as we don't send the
|
||||||
|
// entire payload for the user during the signup process.
|
||||||
|
} = uiSettings || {};
|
||||||
|
|
||||||
DashboardAudioNotificationHelper.setInstanceValues({
|
DashboardAudioNotificationHelper.setInstanceValues({
|
||||||
currentUserId: user.id,
|
currentUserId: user.id,
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ json.data do
|
|||||||
json.display_name resource.display_name
|
json.display_name resource.display_name
|
||||||
json.email resource.email
|
json.email resource.email
|
||||||
json.account_id @account.id
|
json.account_id @account.id
|
||||||
|
json.created_at resource.created_at
|
||||||
json.pubsub_token resource.pubsub_token
|
json.pubsub_token resource.pubsub_token
|
||||||
json.role resource.active_account_user&.role
|
json.role resource.active_account_user&.role
|
||||||
json.inviter_id resource.active_account_user&.inviter_id
|
json.inviter_id resource.active_account_user&.inviter_id
|
||||||
|
|||||||
Reference in New Issue
Block a user