remove trailing slash from API endpoint, appendum to 8da9d0b

legacy/0.4
Martin Zimmermann 11 years ago
parent 375b32a151
commit 7e73986667

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

Loading…
Cancel
Save