remove trailing slash from API endpoint, appendum to 8da9d0b

This commit is contained in:
Martin Zimmermann 2013-11-02 18:39:40 +01:00
parent 375b32a151
commit 7e73986667

View File

@ -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();