diff --git a/devtools/client/debugger/src/components/SecondaryPanes/WhyPaused.js b/devtools/client/debugger/src/components/SecondaryPanes/WhyPaused.js index 7efc890a6c0d..7ecad2f6aa5f 100644 --- a/devtools/client/debugger/src/components/SecondaryPanes/WhyPaused.js +++ b/devtools/client/debugger/src/components/SecondaryPanes/WhyPaused.js @@ -61,14 +61,14 @@ class WhyPaused extends PureComponent { renderMessage(why: ExceptionReason) { if (why.type == "exception" && why.exception) { return ( -
+
{this.renderExceptionSummary(why.exception)}
); } if (typeof why.message == "string") { - return
{why.message}
; + return
{why.message}
; } return null; @@ -78,33 +78,29 @@ class WhyPaused extends PureComponent { const { endPanelCollapsed, why } = this.props; const reason = getPauseReason(why); - if (reason) { - if (!endPanelCollapsed) { - return ( -
-
-
- {L10N.getStr(reason)} - {this.renderMessage(why)} -
-
- -
-
-
- ); - } + if (!reason || endPanelCollapsed) { + return
; } - return
; + + return ( +
+
+
+ {L10N.getStr(reason)} + {this.renderMessage(why)} +
+
+ +
+
+
+ ); } } -const mapStateToProps = state => { - const thread = getCurrentThread(state); - return { - endPanelCollapsed: getPaneCollapse(state, "end"), - why: getWhy(state, thread), - }; -}; +const mapStateToProps = state => ({ + endPanelCollapsed: getPaneCollapse(state, "end"), + why: getWhy(state, getCurrentThread(state)), +}); export default connect(mapStateToProps)(WhyPaused);