Skip to content

Commit

Permalink
abort tile build when canceling
Browse files Browse the repository at this point in the history
  • Loading branch information
bcamper committed Jul 24, 2015
1 parent 008c0cc commit 7683418
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,11 @@ export default class Tile {
tile instance created yet.
*/
static cancel(tile) {
if (tile && tile.source_data && tile.source_data.request) {
tile.source_data.request.abort();
if (tile) {
if (tile.source_data && tile.source_data.request) {
tile.source_data.request.abort();
}
Tile.abortBuild(tile);
}
}

Expand Down

0 comments on commit 7683418

Please sign in to comment.