diff --git a/isso/js/app/api.js b/isso/js/app/api.js index ca6569f..51684a7 100644 --- a/isso/js/app/api.js +++ b/isso/js/app/api.js @@ -55,15 +55,16 @@ define(["q"], function(Q) { if (script.dataset.prefix) { endpoint = script.dataset.prefix; - if (endpoint[endpoint.length - 1] === "/") { - endpoint = endpoint.substring(0, endpoint.length - 1); - } } else { uri = script.src.substring(host.length); endpoint = uri.substring(0, uri.length - "/js/embed.min.js".length); } } + if (endpoint[endpoint.length - 1] === "/") { + endpoint = endpoint.substring(0, endpoint.length - 1); + } + var curl = function(method, url, data) { var xhr = new XMLHttpRequest();