From 416bb162d799c28456de731bb8301f7063b82975 Mon Sep 17 00:00:00 2001
From: Joe Banks <joseph@josephbanks.me>
Date: Tue, 6 Oct 2020 19:00:19 +0100
Subject: Better handle other messages from the React DevTools extension

---
 src/components/OAuth2Button.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/OAuth2Button.tsx')

diff --git a/src/components/OAuth2Button.tsx b/src/components/OAuth2Button.tsx
index 08c4b7f..d67b1ab 100644
--- a/src/components/OAuth2Button.tsx
+++ b/src/components/OAuth2Button.tsx
@@ -58,7 +58,7 @@ function doLogin(disableFunction: (newState: boolean) => void) {
   }, 500)
 
   window.onmessage = (code: MessageEvent) => {
-    if (code.data.hello) {
+    if (code.data.source) {
       // React DevTools has a habit of sending messages, ignore them.
       return;
     }
-- 
cgit v1.2.3

