Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
πŸ› fix title not updating after import (#749)
Browse files Browse the repository at this point in the history
closes TryGhost/Ghost#8508
- manually set `config.blogTitle` when reloading settings after a
successful import
  • Loading branch information
kevinansfield authored and cobbspur committed Jun 22, 2017
1 parent ba5c6f7 commit 54416cb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/controllers/settings/labs.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ export default Controller.extend({

importMimeType: ['application/json', 'application/zip', 'application/x-zip-compressed'],

ajax: injectService(),
config: injectService(),
ghostPaths: injectService(),
notifications: injectService(),
session: injectService(),
settings: injectService(),
ajax: injectService(),

// TODO: convert to ember-concurrency task
_validate(file) {
Expand Down Expand Up @@ -133,7 +134,9 @@ export default Controller.extend({
notifications.showNotification('Import successful.', {key: 'import.upload.success'});

// reload settings
return this.get('settings').reload();
return this.get('settings').reload().then((settings) => {
this.get('config').set('blogTitle', settings.get('title'));
});
});
}).catch((response) => {
if (isUnsupportedMediaTypeError(response)) {
Expand Down

0 comments on commit 54416cb

Please sign in to comment.