Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #788 from rhelmer/ensure-data-collection-when-user…
Browse files Browse the repository at this point in the history
…-enrolled

issue #787 - ensure that data collection is always enabled in core ad…
  • Loading branch information
rhelmer authored Feb 4, 2022
2 parents f4ef33d + 7213530 commit 429fe70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

[Full changelog](https://github.com/mozilla-rally/core-addon/compare/v1.4.2...master)

* [#788](https://github.com/mozilla-rally/rally-core-addon/pull/788): Ensure that data collection is always enabled in core add-on
when user is enrolled

# v1.4.2 (2022-01-26)

[Full changelog](https://github.com/mozilla-rally/core-addon/compare/v1.4.1...v1.4.2)
Expand Down
8 changes: 6 additions & 2 deletions core-addon/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ export default class Core {

// Initialize the collection engine once we know if
// user is enrolled or not.
this._storage.getRallyID().finally(id =>
this._dataCollection.initialize(id !== undefined));
this._storage.getRallyID().then(id => {
this._dataCollection.initialize(id !== undefined)
}).catch(err => {
console.error("No Rally ID, initializing data collection in unenrolled state", err);
this._dataCollection.initialize(false);
});

// Asynchronously get the available studies. We don't need to wait
// for this to finish, the UI can handle the wait.
Expand Down

0 comments on commit 429fe70

Please sign in to comment.