Skip to content

Commit

Permalink
Fix render during interactive readyState
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan.kelley committed Oct 1, 2018
1 parent 56bec6c commit bea63e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Please follow the recommendations outlined at [keepachangelog.com](http://keepac
Changes since last non-beta release.

*Please add entries here for your pull requests that are not yet released.*
- Fix client startup invoking render prematurely. Closes [issue #1150](https://github.com/shakacode/react_on_rails/issues/1150).

### [11.1.4] - 2018-09-12

Expand Down
4 changes: 1 addition & 3 deletions node_package/src/clientStartup.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,7 @@ export function clientStartup(context) {

window.setTimeout(() => {
if (!turbolinksInstalled() || !turbolinksSupported()) {
if (document.readyState === 'complete' ||
(document.readyState !== 'loading' && !document.documentElement.doScroll)
) {
if (document.readyState === 'complete') {
debugTurbolinks(
'NOT USING TURBOLINKS: DOM is already loaded, calling reactOnRailsPageLoaded',
);
Expand Down

0 comments on commit bea63e1

Please sign in to comment.