flush requests queue

This commit is contained in:
Michael Telatynski 2020-10-30 10:31:32 +00:00
parent b01055f962
commit 72f6aa61dd

View file

@ -393,6 +393,11 @@ export default class CountlyAnalytics {
if (!this.disabled && this.anonymous === anonymous) return;
if (!this.canEnable()) return;
if (!this.disabled) {
// flush request queue as our userKey is going to change, no need to await it
this.request();
}
const config = SdkConfig.get();
this.baseUrl = new URL("/i", config.countly.url);
this.appKey = config.countly.appKey;