Skip to content

Commit

Permalink
Wait until notification types are loaded
Browse files Browse the repository at this point in the history
Fixes #3534
  • Loading branch information
Edmundo Alvarez committed Feb 23, 2017
1 parent a0ff84d commit e18d711
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const { AlertNotificationsStore } = CombinedProvider.get('AlertNotifications');
const { AlarmCallbacksActions } = CombinedProvider.get('AlarmCallbacks');
const { CurrentUserStore } = CombinedProvider.get('CurrentUser');

import { EntityListItem } from 'components/common';
import { EntityListItem, Spinner } from 'components/common';
import { UnknownAlertNotification } from 'components/alertnotifications';
import { ConfigurationForm, ConfigurationWell } from 'components/configurationforms';

Expand Down Expand Up @@ -59,6 +59,10 @@ const AlertNotification = React.createClass({
},

render() {
if (!this.state.availableNotifications) {
return <Spinner />;
}

const notification = this.props.alertNotification;
const stream = this.props.stream;
const typeDefinition = this.state.availableNotifications[notification.type];
Expand Down

0 comments on commit e18d711

Please sign in to comment.