Chat-ops fix (#1472)

# What this PR does
Fix for the crash of Chat-ops page

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1467
This commit is contained in:
Yulia Shanyrova 2023-03-07 13:26:50 +01:00 committed by GitHub
parent f5fb5d34dc
commit d6dbfad999
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,11 @@ class ChatOpsPage extends React.Component<AppRootProps, ChatOpsState> {
componentDidMount() {
const { query } = this.props;
this.handleChatopsTabChange(query.tab || ChatOpsTab.Slack);
this.handleChatopsTabChange(query?.tab || ChatOpsTab.Slack);
}
componentWillUnmount() {
this.handleChatopsTabChange(undefined);
}
render() {