fix(client,sdk): accept empty token from parent frame
arcad/edge/pipeline/head This commit looks good Details

This commit is contained in:
wpetit 2023-04-13 13:41:35 +02:00
parent dc93c585eb
commit d0b57ab15f
3 changed files with 6 additions and 6 deletions

View File

@ -3971,11 +3971,11 @@ var Edge = (() => {
clearTimeout(timeoutId);
if (timedOut)
return;
if (!message2.data || !message2.data.token) {
if (!message2.data) {
reject("Unexpected auth token request response !");
return;
}
resolve(message2.data.token);
resolve(message2.data?.token || "");
};
window.addEventListener("message", listener);
const message = { type: EdgeAuthTokenRequest };

File diff suppressed because one or more lines are too long

View File

@ -148,12 +148,12 @@ export class Client extends EventTarget {
if (timedOut) return;
if (!message.data || !message.data.token) {
if (!message.data) {
reject("Unexpected auth token request response !");
return;
}
resolve(message.data.token);
resolve(message.data?.token || "");
}
window.addEventListener('message', listener);