Skip to content

Commit

Permalink
Update client.js
Browse files Browse the repository at this point in the history
  • Loading branch information
amoore108 committed Feb 6, 2025
1 parent a70b5b5 commit 626822d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const bundleToExecute = isModernBrowser ? 'modern' : 'legacy';
// When on an unknown route, the SSR would be discarded and the user would only
// see a blank screen. Avoid this by only hydrating when the embedded page data
// and window location agree what the path is. Otherwise, fallback to the SSR.
if (window.SIMORGH_DATA.path === window.location.pathname) {
if (window?.SIMORGH_DATA?.path === window.location.pathname) {
loadableReady(
() => {
const cache = createCache({ key: 'bbc' });
Expand Down

0 comments on commit 626822d

Please sign in to comment.