We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1399c14 commit 2e55243Copy full SHA for 2e55243
server/services/githubService.ts
@@ -575,7 +575,7 @@ export const getDoobooStats = async ({
575
},
576
};
577
578
- const updatedAt = new Date(userPlugin?.updated_at || '');
+ const updatedAt = userPlugin?.updated_at ? new Date(userPlugin?.updated_at) : null;
579
const today = new Date();
580
581
// When user was queried after 3 hours, update the data in background.
@@ -589,7 +589,7 @@ export const getDoobooStats = async ({
589
})
590
.match({login: userPlugin.login});
591
592
- if (diffHours(updatedAt, today) < 3) {
+ if (!updatedAt || diffHours(updatedAt, today) < 3) {
593
upsertGithubStats({
594
plugin,
595
user_plugin: userPlugin,
0 commit comments