fix: 🐛 role discard should not error (#1226)

This commit is contained in:
Randall Morey authored and GitHub committed 2022-07-28 17:49:51 -07:00
1 parent bfc433dc38
commit ec56d2fbbe
4 files changed
+7 -5

No files matched your search

+3 -1
View File
@@ -27,7 +27,9 @@ export default class RoleModel extends GeneratedRoleModel {
* Convenience for looking up the grant scope, if loaded.
*/
get grantScope() {
return this.store.peekRecord('scope', this.grant_scope_id);
return this.grant_scope_id
? this.store.peekRecord('scope', this.grant_scope_id)
: null;
}
// =methods