From 8c25f3d601deca24b181e216b8fc07f2d140fdd8 Mon Sep 17 00:00:00 2001 From: renato Date: Tue, 16 Feb 2016 18:18:30 +0100 Subject: [PATCH] issy --- datalets/base-datalet/base-datalet.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/datalets/base-datalet/base-datalet.html b/datalets/base-datalet/base-datalet.html index 736a351..0384a70 100755 --- a/datalets/base-datalet/base-datalet.html +++ b/datalets/base-datalet/base-datalet.html @@ -154,7 +154,13 @@ Example : //OpenDataSoft check if(this.dataUrl.indexOf("/records/") > -1 ) { - this.$.base_datalet_link.setAttribute("href", urlSource + "/explore/dataset/" + this.dataUrl.substring(this.dataUrl.indexOf("=")+1,this.dataUrl.indexOf("&"))); + var i; + if(this.dataUrl.indexOf("&") > -1) + i = this.dataUrl.indexOf("&"); + else + i = this.dataUrl.length; + + this.$.base_datalet_link.setAttribute("href", urlSource + "/explore/dataset/" + this.dataUrl.substring(this.dataUrl.indexOf("=")+1, i)); } // CKAN else if(this.dataUrl.indexOf("datastore_search?resource_id") > -1 ) -- libgit2 0.21.4