Fix stale recsys and fix watchman uncaught promise when videoPlayer is not initialized #7014

Merged
jessopb merged 2 commits from fix-staleRecsysId into master 2021-09-03 17:29:23 +02:00
2 changed files with 5 additions and 1 deletions

View file

@ -120,6 +120,10 @@ async function sendAndResetWatchmanData() {
return 'Can only be used with a user id';
}
if (!videoPlayer) {
return 'Video player not initialized';
}
let timeSinceLastIntervalSend = new Date() - lastSentTime;
lastSentTime = new Date();

View file

@ -110,7 +110,7 @@ const recsys = {
uid: userId, // selectUser
claimId: claimId,
pageLoadedAt: Date.now(),
recsysId: makeSelectRecommendedRecsysIdForClaimId(claimId)(state) || recsysId,
recsysId: null,
recClaimIds: [],
recClickedVideoIdx: [],
events: [],