Skip to content

Commit

Permalink
Add verification before loadActiveUsersStatistics (microsoft#1397)
Browse files Browse the repository at this point in the history
* Add verification

* Fix logging

* Apply prettier suggestions

* Add warning
  • Loading branch information
Dmitrii Chichuk authored Apr 28, 2021
1 parent a328c4d commit 83b0bca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/analytics/audience.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ export default class AudienceCommand extends AppCommand {
promises.push(this.loadLanguagesStatistics(statistics, client, app, startDate, endDate, appVersion));
}

if (this.activeUsers) {
if (this.activeUsers && appBuild) {
promises.push(this.loadActiveUsersStatistics(statistics, client, app, startDate, endDate, appVersion, appBuild));
} else if (this.activeUsers) {
out.text("Warning: Please provide app version to get active users statistics.");
}

await out.progress("Loading statistics...", Promise.all(promises));
Expand Down

0 comments on commit 83b0bca

Please sign in to comment.