From 01370a89243d1d46bee9f3b792cc12bb86e3b095 Mon Sep 17 00:00:00 2001 From: Sergey Zyablitsky Date: Wed, 18 May 2016 16:31:28 +1000 Subject: [PATCH] fix too early unmount --- node_package/src/clientStartup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node_package/src/clientStartup.js b/node_package/src/clientStartup.js index bdef84579..0075bfb72 100644 --- a/node_package/src/clientStartup.js +++ b/node_package/src/clientStartup.js @@ -145,10 +145,10 @@ export function clientStartup(context) { } else { if (turbolinksVersion5()) { debugTurbolinks( - 'USING TURBOLINKS 5: document added event listeners turbolinks:before-cache and ' + + 'USING TURBOLINKS 5: document added event listeners turbolinks:before-render and ' + 'turbolinks:load.' ); - document.addEventListener('turbolinks:before-cache', reactOnRailsPageUnloaded); + document.addEventListener('turbolinks:before-render', reactOnRailsPageUnloaded); document.addEventListener('turbolinks:load', reactOnRailsPageLoaded); } else { debugTurbolinks(