Commit 8c25f3d601deca24b181e216b8fc07f2d140fdd8

Authored by Renato De Donato
1 parent 2813afd7

issy

datalets/base-datalet/base-datalet.html
... ... @@ -154,7 +154,13 @@ Example :
154 154 //OpenDataSoft check
155 155 if(this.dataUrl.indexOf("/records/") > -1 )
156 156 {
157   - this.$.base_datalet_link.setAttribute("href", urlSource + "/explore/dataset/" + this.dataUrl.substring(this.dataUrl.indexOf("=")+1,this.dataUrl.indexOf("&")));
  157 + var i;
  158 + if(this.dataUrl.indexOf("&") > -1)
  159 + i = this.dataUrl.indexOf("&");
  160 + else
  161 + i = this.dataUrl.length;
  162 +
  163 + this.$.base_datalet_link.setAttribute("href", urlSource + "/explore/dataset/" + this.dataUrl.substring(this.dataUrl.indexOf("=")+1, i));
158 164 }
159 165 // CKAN
160 166 else if(this.dataUrl.indexOf("datastore_search?resource_id") > -1 )
... ...