mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fixed saving of custom views expansion state
no issue - if `user.accessibility` is `null` as it is for newly created users then toggling the expansion state of custom views menus failed to save because we were assuming there was an object available
This commit is contained in:
parent
e7b198df4a
commit
481bdfbe1a
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ export default class NavigationService extends Service {
|
||||||
|
|
||||||
async _saveNavigationSettings() {
|
async _saveNavigationSettings() {
|
||||||
let user = await this.session.user;
|
let user = await this.session.user;
|
||||||
let userSettings = JSON.parse(user.get('accessibility'));
|
let userSettings = JSON.parse(user.get('accessibility')) || {};
|
||||||
userSettings.navigation = this.settings;
|
userSettings.navigation = this.settings;
|
||||||
user.set('accessibility', JSON.stringify(userSettings));
|
user.set('accessibility', JSON.stringify(userSettings));
|
||||||
return user.save();
|
return user.save();
|
||||||
|
|
Loading…
Add table
Reference in a new issue