Skip to content

Commit

Permalink
Fix backup styles lookup for data providers that doen't provide styles
Browse files Browse the repository at this point in the history
Fixes #168

Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Oct 26, 2020
1 parent d37f9c8 commit 9d637dd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ export class TimegraphOutputComponent extends AbstractTreeOutputComponent<Timegr
}

style = this.styleMap.get(stateStyle.parentKey);
if (!style) {
style = backupStyles[(hash(stateStyle.parentKey) as number % backupStyles.length)];
if (style === undefined) {
style = backupStyles[(Math.abs(hash(stateStyle.parentKey)) as number % backupStyles.length)];
this.styleMap.set(stateStyle.parentKey, style);
}
return {
Expand Down

0 comments on commit 9d637dd

Please sign in to comment.