Skip to content

Commit

Permalink
PMM-6695 fix IA TS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lunaticusgreen committed Feb 17, 2021
1 parent 9632689 commit a12181c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const { Form } = withTypes<NotificationChannelRenderProps>();
const TypeField: FC<{ values: NotificationChannelRenderProps }> = ({ values }) => {
const { type } = values;

switch (type.value) {
switch (type?.value) {
case NotificationChannelType.email:
return <EmailFields />;
case NotificationChannelType.pagerDuty:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
PagerDutyKeyType,
} from '../NotificationChannel.types';
import { TYPE_OPTIONS, PAGER_DUTY_TYPE_OPTIONS } from './AddNotificationChannel.constants';
import { SelectableValue } from '@grafana/data';

export const INITIAL_VALUES = {
[NotificationChannelType.email]: ({
Expand Down Expand Up @@ -43,7 +42,7 @@ export const INITIAL_VALUES = {
}),
};

export const getInitialValues = (notificationChannel?: NotificationChannel) => {
export const getInitialValues = (notificationChannel?: NotificationChannel | null) => {
const defaultValues: NotificationChannelRenderProps = {
name: '',
type: TYPE_OPTIONS[0],
Expand Down

0 comments on commit a12181c

Please sign in to comment.