diff --git a/src/components/alert/alert-component.ts b/src/components/alert/alert-component.ts index 6e3b6dcd8..23c402c9f 100644 --- a/src/components/alert/alert-component.ts +++ b/src/components/alert/alert-component.ts @@ -25,7 +25,7 @@ import { AlertButton, AlertInputOptions, AlertOptions } from './alert-options'; '

' + '' + '
' + - '
' + + '
' + '' + '
' + @@ -58,7 +58,7 @@ import { AlertButton, AlertInputOptions, AlertOptions } from './alert-options'; '' + '
' + - '
' + + '
' + '' + @@ -134,14 +134,14 @@ export class AlertCmp { // normalize the data const data = this.d; - data.buttons = data.buttons.map(button => { + data.buttons = data.buttons ? data.buttons.map(button => { if (typeof button === 'string') { return { text: button }; } return button; - }); + }) : []; - data.inputs = data.inputs.map((input, index) => { + data.inputs = data.inputs ? data.inputs.map((input, index) => { let r: AlertInputOptions = { type: input.type || 'text', name: isPresent(input.name) ? input.name : index + '', @@ -156,7 +156,7 @@ export class AlertCmp { max: isPresent(input.max) ? input.max : null }; return r; - }); + }) : []; // An alert can be created with several different inputs. Radios,