Skip to content

Commit 20bc34f

Browse files
committed
Fix double site name while loading.
1 parent d440182 commit 20bc34f

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

client/modules/User/components/Collection.jsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,9 @@ class Collection extends React.Component {
124124
}
125125

126126
getTitle() {
127-
const title = this.props.t('Common.SiteName');
128-
const collectionTitle = title.concat(' | ');
129-
return collectionTitle;
130-
}
131-
132-
getCollectionOwner() {
127+
if (this.hasCollection()) {
128+
return `${this.props.t('Common.SiteName')} | ${this.getCollectionName()}`;
129+
}
133130
if (this.props.username === this.props.user.username) {
134131
return this.props.t('Collection.Title');
135132
}
@@ -248,9 +245,6 @@ class Collection extends React.Component {
248245
}
249246

250247
render() {
251-
const title = this.hasCollection()
252-
? this.getCollectionName()
253-
: this.getCollectionOwner();
254248
const isOwner = this.isOwner();
255249

256250
return (
@@ -260,7 +254,7 @@ class Collection extends React.Component {
260254
>
261255
<article className="collection">
262256
<Helmet>
263-
<title>{this.getTitle() + title}</title>
257+
<title>{this.getTitle()}</title>
264258
</Helmet>
265259
{this._renderLoader()}
266260
<CollectionMetadata collectionId={this.props.collectionId} />

0 commit comments

Comments
 (0)