Bug 1409101 - Editor is occasionally empty. r=jdescottes, a=ritu
authorJason Laster <jason.laster.11@gmail.com>
Thu, 19 Oct 2017 07:57:00 -0400
changeset 432804 64aa5b5122f90089af082ca3cb64ec4ffcfc3b32
parent 432803 6092c6cb959de0fe3e7c5a8908e35f1d483a3653
child 432805 9d9ed1a5d9e98ef83f029c73cc08e68759da510d
push id8066
push userryanvm@gmail.com
push dateFri, 27 Oct 2017 15:12:55 +0000
treeherdermozilla-beta@9d9ed1a5d9e9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes, ritu
bugs1409101
milestone57.0
Bug 1409101 - Editor is occasionally empty. r=jdescottes, a=ritu
devtools/client/debugger/new/debugger.js
--- a/devtools/client/debugger/new/debugger.js
+++ b/devtools/client/debugger/new/debugger.js
@@ -24821,16 +24821,19 @@ class Editor extends _react.PureComponen
     self.toggleConditionalPanel = this.toggleConditionalPanel.bind(this);
   }
 
   componentWillReceiveProps(nextProps) {
     // This lifecycle method is responsible for updating the editor
     // text.
     var selectedSource = nextProps.selectedSource;
 
+    if (!this.state.editor) {
+        return;
+    }
 
     if (nextProps.startPanelSize !== this.props.startPanelSize || nextProps.endPanelSize !== this.props.endPanelSize) {
       this.state.editor.codeMirror.setSize();
     }
 
     if (!selectedSource) {
       if (this.props.selectedSource) {
         this.showMessage("");