Skip to content

Commit

Permalink
Merge pull request #4594 from cloud-gov/fix-builds-polling-to-visibil…
Browse files Browse the repository at this point in the history
…ityState-4591

fix: Site builds polling to use doc visibilityState #4591
  • Loading branch information
apburnes authored Sep 9, 2024
2 parents 94de0aa + 1653c63 commit 76561cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/components/site/siteBuilds.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function SiteBuilds() {
buildActions.fetchBuilds({ id });

const intervalHandle = setInterval(() => {
if (document.hasFocus()) {
if (document.visibilityState === 'visible') {
buildActions.refetchBuilds({ id });
}
}, REFRESH_INTERVAL);
Expand Down

0 comments on commit 76561cf

Please sign in to comment.