Skip to content

Commit

Permalink
fix(config_model): handling case when interface parent not found
Browse files Browse the repository at this point in the history
Closes #137

Signed-off-by: Lukas Mertens <[email protected]>

commit-id:7e4fdb93
  • Loading branch information
lukas-mertens committed Apr 15, 2024
1 parent 7690df8 commit 2cd24a5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/modules/evbc/config_model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,9 @@ class EVConfigModel {
return this._instances[id];
}

interfaces_match(provide: string, requirement: string) {
if (provide === requirement) return true;
// still difficult to read :(
if (this._interface_parents[provide].has(requirement)) return true;
return false;
interfaces_match(provide: string, requirement: string): boolean {
return provide === requirement ||
(this._interface_parents[provide]?.has(requirement) ?? false);
}

serialize(): EverestConfig {
Expand Down

0 comments on commit 2cd24a5

Please sign in to comment.