flush requests queue

pull/21833/head
Michael Telatynski 2020-10-30 10:31:32 +00:00
parent b01055f962
commit 72f6aa61dd
1 changed files with 5 additions and 0 deletions

View File

@ -393,6 +393,11 @@ export default class CountlyAnalytics {
if (!this.disabled && this.anonymous === anonymous) return; if (!this.disabled && this.anonymous === anonymous) return;
if (!this.canEnable()) 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(); const config = SdkConfig.get();
this.baseUrl = new URL("/i", config.countly.url); this.baseUrl = new URL("/i", config.countly.url);
this.appKey = config.countly.appKey; this.appKey = config.countly.appKey;