mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 18:22:21 +00:00
fix store tests (analytics created store before it existed)
This commit is contained in:
parent
861b78ce8a
commit
daca2c7fff
2 changed files with 2 additions and 4 deletions
|
|
@ -17,8 +17,6 @@ let ALLOWED_HIT_TYPES = [
|
|||
'timing',
|
||||
];
|
||||
|
||||
const store = getStore();
|
||||
|
||||
function _doesNotHaveRequiredFields (properties) {
|
||||
if (!isEqual(keys(pick(properties, REQUIRED_FIELDS)), REQUIRED_FIELDS)) {
|
||||
// @TODO: Log with Winston?
|
||||
|
|
@ -36,6 +34,7 @@ function _doesNotHaveAllowedHitType (properties) {
|
|||
}
|
||||
|
||||
function _gatherUserStats (properties) {
|
||||
const store = getStore();
|
||||
const user = store.state.user.data;
|
||||
const tasks = store.state.tasks.data;
|
||||
|
||||
|
|
@ -65,6 +64,7 @@ function _gatherUserStats (properties) {
|
|||
}
|
||||
|
||||
export function setUser () {
|
||||
const store = getStore();
|
||||
const user = store.state.user.data;
|
||||
window.amplitude.setUserId(user._id);
|
||||
window.ga('set', {userId: user._id});
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@ export async function socialAuth (store, params) {
|
|||
authResponse: params.auth.authResponse,
|
||||
});
|
||||
|
||||
// @TODO: Analytics
|
||||
|
||||
let user = result.data.data;
|
||||
|
||||
let userLocalData = JSON.stringify({
|
||||
|
|
|
|||
Loading…
Reference in a new issue