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 => {
|
||||
// InitializeAudioNotifications
|
||||
const { ui_settings: uiSettings } = user || {};
|
||||
const {
|
||||
always_play_audio_alert: alwaysPlayAudioAlert,
|
||||
enable_audio_alerts: audioAlertType,
|
||||
alert_if_unread_assigned_conversation_exist: alertIfUnreadConversationExist,
|
||||
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({
|
||||
currentUserId: user.id,
|
||||
|
||||
@@ -6,6 +6,7 @@ json.data do
|
||||
json.display_name resource.display_name
|
||||
json.email resource.email
|
||||
json.account_id @account.id
|
||||
json.created_at resource.created_at
|
||||
json.pubsub_token resource.pubsub_token
|
||||
json.role resource.active_account_user&.role
|
||||
json.inviter_id resource.active_account_user&.inviter_id
|
||||
|
||||
Reference in New Issue
Block a user