Skip to content

Commit

Permalink
Bugfix: Failed to execute 'removeChild'
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGutTal committed Jul 13, 2017
1 parent f38a8ea commit b9b7025
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dist/leaflet.utfgrid-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ L.UtfGrid = (L.Layer || L.Class).extend({
window[wk][functionName] = function (data) {
self._cache[key] = data;
delete window[wk][functionName];
head.removeChild(script);
if (script.parentElement===head) {
head.removeChild(script);
}
self._finish_request(key);
};

Expand Down
2 changes: 1 addition & 1 deletion dist/leaflet.utfgrid.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/leaflet.utfgrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ L.UtfGrid = (L.Layer || L.Class).extend({
window[wk][functionName] = function (data) {
self._cache[key] = data;
delete window[wk][functionName];
head.removeChild(script);
if (script.parentElement===head) {
head.removeChild(script);
}
self._finish_request(key);
};

Expand Down

1 comment on commit b9b7025

@SergioGutTal
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addresses issue danzel#47

Please sign in to comment.