Skip to content

Commit

Permalink
Wait until notification types are loaded (#3537) (#3542)
Browse files Browse the repository at this point in the history
Fixes #3534
(cherry picked from commit 0a3b881)
  • Loading branch information
dennisoelkers authored and kroepke committed Feb 23, 2017
1 parent 76ede1b commit 7cec8c5
Showing 1 changed file with 5 additions and 1 deletion.
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 7cec8c5

Please sign in to comment.