message: only create resizer in MainSplit when ref becomes available
diff: @@ -35,28 +35,42 @@ export default class MainSplit extends React.Component {
  this.resizeContainer,
  FixedDistributor);
  resizer.setClassNames(classNames);
  - return resizer;
  + const rhsSize = window.localStorage.getItem("mx_rhs_size");
  + if (rhsSize !== null) {
  + resizer.forHandleAt(0).resize(parseInt(rhsSize, 10));
  + }
  +
  + resizer.attach();
  + this.resizer = resizer;
  }
  _setResizeContainerRef(div) {
  this.resizeContainer = div;
  }
  - _loadResizerPreferences() {
  - const rhsSize = window.localStorage.getItem("mx_rhs_size");
  - if (rhsSize !== null) {
  - this.resizer.forHandleAt(0).resize(parseInt(rhsSize, 10));
  + componentDidMount() {
  + if (this.props.panel && !this.collapsedRhs) {
  + this._createResizer();
  }
  }
  - componentDidMount() {
  - this.resizer = this._createResizer();
  - this.resizer.attach();
  - this._loadResizerPreferences();
  + componentWillUnmount() {
  + this.resizer.detach();
  + this.resizer = null;
  }
  - componentWillUnmount() {
  + componentDidUpdate(prevProps) {
  + const wasExpanded = !this.props.collapsedRhs && prevProps.collapsedRhs;
  + const wasCollapsed = this.props.collapsedRhs && !prevProps.collapsedRhs;
  + const wasPanelSet = this.props.panel && !prevProps.panel;
  + const wasPanelCleared = !this.props.panel && prevProps.panel;
  +
  + if (wasExpanded || wasPanelSet) {
  + this._createResizer();
  + } else if (wasCollapsed || wasPanelCleared) {
  this.resizer.detach();
  + this.resizer = null;
  + }
  }
  render() {
  