From 7e73986667987dc516ef470e629ba89569e5210a Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Sat, 2 Nov 2013 18:39:40 +0100 Subject: [PATCH] remove trailing slash from API endpoint, appendum to 8da9d0b --- isso/js/app/api.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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();