0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed missing default views when user.accessibility is null

no issue

- removed an old guard that was exiting early when `user.accessibility` was null which meant that the default views were never being inserted into the custom views list
This commit is contained in:
Kevin Ansfield 2020-02-03 12:34:23 +00:00
parent 7c205c1a55
commit 1adae0d041

View file

@ -124,13 +124,7 @@ export default class CustomViewsService extends Service {
}
let user = await this.session.user;
let userSettings = user.get('accessibility');
if (!userSettings) {
return this.viewList = [];
}
let views = JSON.parse(user.get('accessibility')).views;
let views = JSON.parse(user.get('accessibility') || '{}').views;
views = isArray(views) ? views : [];
let viewList = [];