From 4773074636a2911610419fda2e19d73494601148 Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Thu, 15 Feb 2018 13:57:10 -0500 Subject: [PATCH] Update the document title when it is different than the saved document title --- client/components/data/document-head/index.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/components/data/document-head/index.jsx b/client/components/data/document-head/index.jsx index 277b4a4f7fab0c..a016c851d1d720 100644 --- a/client/components/data/document-head/index.jsx +++ b/client/components/data/document-head/index.jsx @@ -16,6 +16,7 @@ import { getDocumentHeadFormattedTitle, getDocumentHeadLink, getDocumentHeadMeta, + getDocumentHeadTitle, } from 'state/document-head/selectors'; import { setDocumentHeadTitle as setTitle, @@ -53,7 +54,7 @@ class DocumentHead extends Component { } componentWillReceiveProps( nextProps ) { - if ( nextProps.title !== undefined && this.props.title !== nextProps.title ) { + if ( nextProps.title !== undefined && nextProps.title !== nextProps.savedTitle ) { this.props.setTitle( nextProps.title ); } @@ -133,6 +134,7 @@ export default connect( formattedTitle: getDocumentHeadFormattedTitle( state ), allLinks: getDocumentHeadLink( state ), allMeta: getDocumentHeadMeta( state ), + savedTitle: getDocumentHeadTitle( state ), } ), { setTitle,