From a28176a6d79c063c061f778000d0b8eb21706f1d Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Mon, 27 Nov 2017 23:46:42 +0900 Subject: [PATCH] Add the case where the user is not logged in webapp --- src/browser/webview/mattermost.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/browser/webview/mattermost.js b/src/browser/webview/mattermost.js index 284f2b5c..c6b5052c 100644 --- a/src/browser/webview/mattermost.js +++ b/src/browser/webview/mattermost.js @@ -12,7 +12,10 @@ Notification = EnhancedNotification; // eslint-disable-line no-global-assign, no Reflect.deleteProperty(global.Buffer); // http://electron.atom.io/docs/tutorial/security/#buffer-global function isReactAppInitialized() { - const initializedRoot = document.querySelector('div[data-reactroot]') || document.querySelector('#root.channel-view'); + const initializedRoot = + document.querySelector('#root.channel-view') || // React 16 webapp + document.querySelector('#root .signup-team__container') || // React 16 login + document.querySelector('div[data-reactroot]'); // Older React apps if (initializedRoot === null) { return false; }