File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
components/connection-modal Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const ConnectionModalComponent = props => (
44
44
) ;
45
45
46
46
ConnectionModalComponent . propTypes = {
47
- connectingMessage : PropTypes . node ,
47
+ connectingMessage : PropTypes . node . isRequired ,
48
48
connectionSmallIconURL : PropTypes . string ,
49
49
connectionTipIconURL : PropTypes . string ,
50
50
name : PropTypes . node ,
@@ -55,6 +55,10 @@ ConnectionModalComponent.propTypes = {
55
55
useAutoScan : PropTypes . bool . isRequired
56
56
} ;
57
57
58
+ ConnectionModalComponent . defaultProps = {
59
+ connectingMessage : 'Connecting'
60
+ } ;
61
+
58
62
export {
59
63
ConnectionModalComponent as default ,
60
64
PHASES
Original file line number Diff line number Diff line change @@ -107,15 +107,15 @@ class ConnectionModal extends React.Component {
107
107
render ( ) {
108
108
return (
109
109
< ConnectionModalComponent
110
- connectingMessage = { this . state . extension . connectingMessage }
111
- connectionIconURL = { this . state . extension . connectionIconURL }
112
- connectionSmallIconURL = { this . state . extension . connectionSmallIconURL }
113
- connectionTipIconURL = { this . state . extension . connectionTipIconURL }
110
+ connectingMessage = { this . state . extension && this . state . extension . connectingMessage }
111
+ connectionIconURL = { this . state . extension && this . state . extension . connectionIconURL }
112
+ connectionSmallIconURL = { this . state . extension && this . state . extension . connectionSmallIconURL }
113
+ connectionTipIconURL = { this . state . extension && this . state . extension . connectionTipIconURL }
114
114
extensionId = { this . props . extensionId }
115
- name = { this . state . extension . name }
115
+ name = { this . state . extension && this . state . extension . name }
116
116
phase = { this . state . phase }
117
117
title = { this . props . extensionId }
118
- useAutoScan = { this . state . extension . useAutoScan }
118
+ useAutoScan = { this . state . extension && this . state . extension . useAutoScan }
119
119
vm = { this . props . vm }
120
120
onCancel = { this . handleCancel }
121
121
onConnected = { this . handleConnected }
You can’t perform that action at this time.
0 commit comments