Skip to content

Commit

Permalink
Prevent disconnected alert during data fetching. Fixes #23
Browse files Browse the repository at this point in the history
  • Loading branch information
julianrojas87 committed Feb 16, 2021
1 parent 2746c51 commit 16485c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/MainLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ class MainLayout extends Component {
};

fromTo = async feature => {
// Data is already being fetched so do nothing in the meantime
if(this.state.loading) return false;

// Start building network graph
await this.fetchAbstractionTile(feature.lngLat);
if (!this.from.ports && this.state.to !== feature[RDFS.label]) {
Expand Down

0 comments on commit 16485c5

Please sign in to comment.