Commit 5fd0e051b167790c9d578a20b3cbfea8a11e762d
1 parent
7fb2403b
plugin update
Showing
1 changed file
with
1 additions
and
1 deletions
datalets/leafletjs-geojson-datalet/leafletjs-geojson-datalet.html
@@ -135,7 +135,7 @@ Example: | @@ -135,7 +135,7 @@ Example: | ||
135 | var popupText = ""; | 135 | var popupText = ""; |
136 | for(var j=1; j<t.data.length; j++) | 136 | for(var j=1; j<t.data.length; j++) |
137 | { | 137 | { |
138 | - if(typeof t.data[j] != 'undefined' && typeof t.data[j].data[i] != 'undefined') | 138 | + if(typeof t.data[j] != 'undefined' && t.data[j].data[i] && typeof t.data[j].data[i] != 'undefined') |
139 | { | 139 | { |
140 | if (t.data[j].data[i].toString().match(new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"))) | 140 | if (t.data[j].data[i].toString().match(new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"))) |
141 | popupText += '<image height="100" width="100" src="' + t.data[j].data[i] + '" /><br/>'; | 141 | popupText += '<image height="100" width="100" src="' + t.data[j].data[i] + '" /><br/>'; |