From 46350cec56297aef1f94b98f1606ad02780ae107 Mon Sep 17 00:00:00 2001 From: Ryan Kelley Date: Wed, 3 Oct 2018 01:10:47 -0500 Subject: [PATCH] Fix render during interactive readyState (#1151) --- CHANGELOG.md | 1 + node_package/src/clientStartup.js | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb24156a4..00ee76b6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/node_package/src/clientStartup.js b/node_package/src/clientStartup.js index 03ee5cc40..93a4a9a91 100644 --- a/node_package/src/clientStartup.js +++ b/node_package/src/clientStartup.js @@ -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', );