delay postMessage to ensure listener registered
This commit is contained in:
parent
083bafcd6f
commit
f30c403bb1
|
@ -30,5 +30,8 @@ export const checkAndDispatchStatusContactCode = dispatch => {
|
||||||
if (statusApiSuccess(event) && hasContactCode()) dispatch(receiveStatusContactCode(STATUS_API[CONTACT_CODE]))
|
if (statusApiSuccess(event) && hasContactCode()) dispatch(receiveStatusContactCode(STATUS_API[CONTACT_CODE]))
|
||||||
});
|
});
|
||||||
|
|
||||||
window.postMessage({ type: STATUS_API_REQUEST, permissions: ["CONTACT_CODE", "CONTACTS"] }, '*');
|
setTimeout(
|
||||||
|
() => { window.postMessage({ type: STATUS_API_REQUEST, permissions: ["CONTACT_CODE", "CONTACTS"] }, '*') },
|
||||||
|
1000
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue