Skip to content

Commit 3a39cac

Browse files
committed
Let Sentry check every minute whether we're up to date
1 parent 47f9a6d commit 3a39cac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/common/src/utils/analytics/sentry.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@ function getSentry(): Promise<typeof import('@sentry/browser')> {
1010
}
1111

1212
let latestVersionPromise: Promise<string>;
13+
const versionTimeout = 1 * 60 * 1000;
1314
function getLatestVersion() {
1415
if (!latestVersionPromise) {
1516
latestVersionPromise = fetch('/version.txt')
1617
.then(x => x.text())
1718
.catch(x => '');
19+
20+
setTimeout(() => {
21+
latestVersionPromise = undefined;
22+
}, versionTimeout);
1823
}
1924

2025
return latestVersionPromise;

0 commit comments

Comments
 (0)