From 564748cfc0678f2295fa6edc787e329c9bca559c Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Sun, 3 Dec 2017 20:56:45 -0800 Subject: [PATCH] Use key instead --- app/components/ErrorBoundary/ErrorBoundary.js | 11 ----------- app/scenes/Document/Document.js | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/app/components/ErrorBoundary/ErrorBoundary.js b/app/components/ErrorBoundary/ErrorBoundary.js index 162e164f5..f34df8fac 100644 --- a/app/components/ErrorBoundary/ErrorBoundary.js +++ b/app/components/ErrorBoundary/ErrorBoundary.js @@ -2,12 +2,10 @@ import React, { Component } from 'react'; import { observer } from 'mobx-react'; import { observable } from 'mobx'; -import type { Location } from 'react-router-dom'; import CenteredContent from 'components/CenteredContent'; import PageTitle from 'components/PageTitle'; type Props = { - location?: Location, children?: ?React.Element, }; @@ -16,15 +14,6 @@ class ErrorBoundary extends Component { props: Props; @observable error: boolean = false; - componentWillReceiveProps(nextProps: Object) { - if ( - this.props.location && - nextProps.location && - this.props.location.pathname !== nextProps.location.pathname - ) - this.error = false; - } - componentDidCatch(error: Error, info: Object) { this.error = true; diff --git a/app/scenes/Document/Document.js b/app/scenes/Document/Document.js index af22e5536..084d96f68 100644 --- a/app/scenes/Document/Document.js +++ b/app/scenes/Document/Document.js @@ -217,7 +217,7 @@ class DocumentScene extends Component { return ( - + {isMoving && document && } {titleText && } {(this.isLoading || this.isSaving) && }