Skip to content

Commit 4fe495c

Browse files
authored
Handle not finding service row (#33)
2 parents 7f0ff06 + 22c82db commit 4fe495c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/pages/HomePage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class HomePage extends Page {
3131
this.#services = services;
3232
}
3333

34-
public getRows(id: string): [ServiceRow] | [ServiceRow, ServiceGroupRow] {
34+
public getRows(id: string): [] | [ServiceRow] | [ServiceRow, ServiceGroupRow] {
3535
for (const row of this.rows) {
3636
if (row.service.id === id) {
3737
return [row];
@@ -45,7 +45,7 @@ export class HomePage extends Page {
4545
}
4646
}
4747

48-
throw new Error(`Could not find row for service ${id}`);
48+
return [];
4949
}
5050

5151
public override async connectedCallback() {

0 commit comments

Comments
 (0)