Skip to content

Commit

Permalink
Fixed error causing missing sidebar after import
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
kevinansfield committed Mar 4, 2019
1 parent ea6ecf9 commit 8de12b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/role.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ export default Model.extend({
updatedBy: attr('number'),

lowerCaseName: computed('name', function () {
return this.get('name').toLocaleLowerCase();
return (this.name || '').toLocaleLowerCase();
})
});

0 comments on commit 8de12b5

Please sign in to comment.