Skip to content

Commit

Permalink
guard against empty string passed as the importUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlukerice committed May 13, 2015
1 parent cf27e7e commit 7589c15
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions leaflet.shpfile.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
L.Shapefile =L.GeoJSON.extend({
initialize: function (file, options, importUrl) {
if(typeof cw !== 'undefined'){
if (typeof importUrl === 'undefined') {
importUrl = 'shp.js';
}
this.worker = cw(function(data,cb){
importScripts(importUrl);
importScripts(importUrl || 'shp.js');
shp(data).then(cb);
});
}
Expand Down

0 comments on commit 7589c15

Please sign in to comment.