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

Fixed error causing missing sidebar after import

no issue
- the `Role.lowerCaseName` CP could throw an error when `name` was missing which caused the sidebar rendering to be aborted
- adds a guard to ensure we aren't calling string methods on `null` or `undefined`
This commit is contained in:
Kevin Ansfield 2019-03-04 16:17:13 +00:00
parent 3ad9fb16d4
commit a19c718e6c

View file

@ -12,6 +12,6 @@ export default Model.extend({
updatedBy: attr('number'),
lowerCaseName: computed('name', function () {
return this.get('name').toLocaleLowerCase();
return (this.name || '').toLocaleLowerCase();
})
});