Skip to content

Commit

Permalink
fix(route-draw): throw error if response not OK
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Jan 6, 2025
1 parent 45896c3 commit 1819ea3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/route-draw/route-draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,9 @@ class RouteDraw {
this.loading = true;
try {
var response = await fetch(url, { signal: this.controller.signal });
if (!response.ok) {
throw Error;
}
var json = await response.json();
} catch (err) {
this.loading = false;
Expand Down

0 comments on commit 1819ea3

Please sign in to comment.