Skip to content

Commit

Permalink
adds client reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert27 committed Jul 27, 2024
1 parent b28a231 commit a156327
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ let _client: AptabaseClient | undefined;
export function init(appKey: string, options?: AptabaseOptions) {
const [ok, msg] = validate(Platform.OS, appKey, options);
if (!ok) {
if (_client) {
_client.stopPolling();
_client = undefined;
}
console.warn(`Aptabase: ${msg}. Tracking will be disabled.`);
return;
}
Expand Down

0 comments on commit a156327

Please sign in to comment.