From 6533716fac07e4988ef94231a0c0c8aba68e0d5e Mon Sep 17 00:00:00 2001
From: Florian Dold <florian.dold@gmail.com>
Date: Mon, 9 Apr 2018 00:20:54 +0200
Subject: prevent race condition where we can accept tip before the background
 page knows about it

---
 src/webex/pages/tip.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/webex/pages/tip.tsx')

diff --git a/src/webex/pages/tip.tsx b/src/webex/pages/tip.tsx
index f21bc0eaf..6fbb3005d 100644
--- a/src/webex/pages/tip.tsx
+++ b/src/webex/pages/tip.tsx
@@ -127,7 +127,7 @@ class TipDisplay extends React.Component<TipDisplayProps, TipDisplayState> {
         <button
             className="pure-button pure-button-primary"
             type="button"
-            disabled={!(this.state.rci && this.state.tipStatus)}
+            disabled={!(this.state.rci && this.state.tipStatus && this.state.tipStatus.tipRecord)}
             onClick={() => this.accept()}>
           { this.state.working
             ? <span><object className="svg-icon svg-baseline" data="/img/spinner-bars.svg" /> </span>
-- 
cgit v1.2.3

