Skip to content

Commit

Permalink
window._react_website_reload_data
Browse files Browse the repository at this point in the history
  • Loading branch information
purecatamphetamine committed Apr 21, 2019
1 parent fcb2df4 commit 89a07f1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/redux/preload collect.js
Expand Up @@ -126,7 +126,12 @@ function set_up_preloader(preloader, preload_arguments, server)

// If Server-Side Rendering is not being used at all
// then all `@preload()`s must be marked as client-side ones.
if (!server && !window._server_side_render)
// The `window._server_side_render` flag is actually never set in this library.
// CC public website relies on it not being set so that all
// `@preload()`s re-run on client side for AWS S3 static hosted website.
// If `window._server_side_render` flag is ever modified to be set (though unlikely)
// then CC public website should set `window._react_website_reload_data` to `true`.
if (!server && (!window._server_side_render || window._react_website_reload_data))
{
preloader.options.client = true
}
Expand Down

0 comments on commit 89a07f1

Please sign in to comment.