Merge pull request #4009 from stianst/master

KEYCLOAK-4717 Added extra check for data content in receive message f…
This commit is contained in:
Stian Thorgersen 2017-04-06 10:42:37 +02:00 committed by GitHub
commit 859b575a12

View file

@ -836,8 +836,12 @@
return;
}
if (!(event.data == 'unchanged' || event.data == 'changed' || event.data == 'error')) {
return;
}
if (event.data != "unchanged") {
if (event.data != 'unchanged') {
kc.clearToken();
}
@ -845,7 +849,7 @@
for (var i = callbacks.length - 1; i >= 0; --i) {
var promise = callbacks[i];
if (event.data == "unchanged") {
if (event.data == 'unchanged') {
promise.setSuccess();
} else {
promise.setError();