Fix for KEYCLOAK-3961

This commit is contained in:
danren 2016-12-02 13:30:53 +01:00
parent cec6f5db14
commit 87b243ed59

View file

@ -846,14 +846,15 @@
kc.clearToken(); kc.clearToken();
} }
for (var i = loginIframe.callbackList.length - 1; i >= 0; --i) { var callbacks = loginIframe.callbackList.splice(0, loginIframe.callbackList.length);
var promise = loginIframe.callbackList[i];
for (var i = callbacks.length - 1; i >= 0; --i) {
var promise = callbacks[i];
if (event.data == "unchanged") { if (event.data == "unchanged") {
promise.setSuccess(); promise.setSuccess();
} else { } else {
promise.setError(); promise.setError();
} }
loginIframe.callbackList.splice(i, 1);
} }
}; };