Skip to content

Commit

Permalink
Reset fetching flag in a try-finally statement
Browse files Browse the repository at this point in the history
Fixes #66

Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Nov 24, 2020
1 parent 7bde344 commit 35a92bf
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions timeline-chart/src/layer/time-graph-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,22 @@ export class TimeGraphChart extends TimeGraphChartLayer {
update
)) {
this.fetching = true;
const rowData = await this.providers.dataProvider(viewRange, resolution);
if (rowData) {
this.providedResolution = rowData.resolution;
this.providedRange = rowData.range;
this.setRowModel(rowData.rows);
this.removeChildren();
this.addRows(this.rows, this.rowController.rowHeight);
if (this.isNavigating) {
this.selectStateInNavigation();
try {
const rowData = await this.providers.dataProvider(viewRange, resolution);
if (rowData) {
this.providedResolution = rowData.resolution;
this.providedRange = rowData.range;
this.setRowModel(rowData.rows);
this.removeChildren();
this.addRows(this.rows, this.rowController.rowHeight);
if (this.isNavigating) {
this.selectStateInNavigation();
}
}
} finally {
this.fetching = false;
this.isNavigating = false;
}
this.fetching = false;
}
}

Expand Down

0 comments on commit 35a92bf

Please sign in to comment.