From 481bdfbe1aff9e97f0c2263d645fbaffe8bf8b5f Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 18 May 2020 13:45:59 +0100 Subject: [PATCH] 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 --- ghost/admin/app/services/navigation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/admin/app/services/navigation.js b/ghost/admin/app/services/navigation.js index af60983b6a..7478f394dc 100644 --- a/ghost/admin/app/services/navigation.js +++ b/ghost/admin/app/services/navigation.js @@ -52,7 +52,7 @@ export default class NavigationService extends Service { async _saveNavigationSettings() { let user = await this.session.user; - let userSettings = JSON.parse(user.get('accessibility')); + let userSettings = JSON.parse(user.get('accessibility')) || {}; userSettings.navigation = this.settings; user.set('accessibility', JSON.stringify(userSettings)); return user.save();