Don't read properties off of null objects
Somehow this controller code runs sometimes when the existing jobs are dematerializing. This makes this.get('model') and array of null
This commit is contained in:
parent
1f300eb4fb
commit
5223a3f816
|
@ -40,6 +40,7 @@ export default Controller.extend(Sortable, Searchable, {
|
|||
const activeNamespace = this.get('system.activeNamespace.id') || 'default';
|
||||
|
||||
return this.get('model')
|
||||
.compact()
|
||||
.filter(job => !hasNamespaces || job.get('namespace.id') === activeNamespace)
|
||||
.filter(job => !job.get('parent.content'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue