From eeaf6949c5e1b51db68eb47ec7455844e6693369 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Mon, 28 Aug 2017 22:46:06 +0200
Subject: [PATCH] Delay 'View detail' if the website is reloading

---
 Resources/Scripts/code.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js
index 2771fcc9..c3801234 100644
--- a/Resources/Scripts/code.js
+++ b/Resources/Scripts/code.js
@@ -222,6 +222,14 @@
     };
     
     window.TDGF_showTweetDetail = function(columnId, chirpId, fallbackUrl){
+      if (!TD.ready){
+        onAppReady.push(function(){
+          window.TDGF_showTweetDetail(columnId, chirpId, fallbackUrl);
+        });
+        
+        return;
+      }
+      
       let column = TD.controller.columnManager.getByApiid(columnId);
       
       if (!column){