@@ -63,24 +63,25 @@ class App extends React.Component {
6363 < div className = "alert alert-danger" role = "alert" > { this . props . stubReducer . notify } { this . props . stubReducer . stubErrors } </ div >
6464 }
6565 < label className = "control-label" htmlFor = "templateSelectInput" > Service Template</ label >
66- < select id = "templateSelectInput" defaultValue = { this . props . stubReducer . current . id } className = "form-control" onChange = { ( e ) => this . props . onStubSelect ( e . target . selectedIndex ) } >
66+ < select id = "templateSelectInput" defaultValue = { this . props . stubReducer . current && this . props . stubReducer . current . id || '' } className = "form-control" onChange = { ( e ) => this . props . onStubSelect ( e . target . selectedIndex ) } >
6767 { this . props . stubReducer . templates . map ( t => (
6868 < option key = { t . id } value = { t . id } > { t . name } </ option >
6969 ) ) }
7070 </ select >
71- < Template fullPath = { this . props . stubReducer . fullPath }
72- idText = { this . props . stubReducer . idText }
73- nameText = { this . props . stubReducer . nameText }
74- pathText = { this . props . stubReducer . pathText }
75- template = { this . props . stubReducer . current }
76- links = { this . props . stubReducer . links }
77- disable = { this . props . stubReducer . disable }
78- onChangeIdText = { this . props . onChangeIdText }
79- onChangePathText = { this . props . onChangePathText }
80- onChangeNameText = { this . props . onChangeNameText }
81- onChangeOption = { this . props . onChangeOption }
82- onChangeLink = { this . props . onChangeLink }
83- onStubSent = { this . props . onStubSent } />
71+ { this . props . stubReducer . current &&
72+ < Template fullPath = { this . props . stubReducer . fullPath }
73+ idText = { this . props . stubReducer . idText }
74+ nameText = { this . props . stubReducer . nameText }
75+ pathText = { this . props . stubReducer . pathText }
76+ template = { this . props . stubReducer . current }
77+ links = { this . props . stubReducer . links }
78+ disable = { this . props . stubReducer . disable }
79+ onChangeIdText = { this . props . onChangeIdText }
80+ onChangePathText = { this . props . onChangePathText }
81+ onChangeNameText = { this . props . onChangeNameText }
82+ onChangeOption = { this . props . onChangeOption }
83+ onChangeLink = { this . props . onChangeLink }
84+ onStubSent = { this . props . onStubSent } /> }
8485 </ div >
8586 ) ;
8687 }
0 commit comments