Skip to content

Commit

Permalink
feat(adapt): only on the PROD website (#11331)
Browse files Browse the repository at this point in the history
otherwise it can cause unexpected errors
in our end-to-end tests or local testing
  • Loading branch information
mxdvl committed May 1, 2024
1 parent 77a5d70 commit 3a679a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dotcom-rendering/src/client/adaptiveSite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const shouldAdapt = async (): Promise<boolean> => {
if (isServer) return false;
if (window.location.hash === '#adapt') return true;
if (!window.guardian.config.switches.adaptiveSite) return false;
if (window.location.host !== 'www.theguardian.com') return false;

// only evaluate this code if we want to adapt in response to page performance
const { isPerformingPoorly } = await import(
Expand Down

0 comments on commit 3a679a0

Please sign in to comment.