fix endpoint detection when using require.js

This commit is contained in:
Martin Zimmermann 2013-11-05 12:35:45 +01:00
parent 8d1171df29
commit aa6665c8f0

View File

@ -43,6 +43,8 @@ define(["q"], function(Q) {
for (var i = 0; i < js.length; i++) {
if (js[i].dataset.issoPrefix !== undefined) {
endpoint = js[i].dataset.issoPrefix;
} else if (js[i].src.match("require\\.js$")) {
endpoint = js[i].dataset.main.replace(/\/js\/(embed|count)$/, "");
}
}