Skip to content

Commit

Permalink
Small defensive condition added to service getter
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Aug 22, 2022
1 parent 065df46 commit f14031c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ui/app/controllers/allocations/allocation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default class IndexController extends Controller.extend(Sortable) {
@computed('tasks.@each.services')
get taskServices() {
return this.get('tasks')
.map((t) => (t.get('services') || []).toArray())
.map((t) => (t && t.get('services') || []).toArray())
.flat()
.compact();
}
Expand Down
1 change: 1 addition & 0 deletions ui/tests/acceptance/regions-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ module('Acceptance | regions (many)', function (hooks) {
const newRegion = server.db.regions[1].id;

await Allocation.visit({ id: server.db.allocations[0].id });
await this.pauseTest();

await selectChoose('[data-test-region-switcher-parent]', newRegion);

Expand Down

0 comments on commit f14031c

Please sign in to comment.