diff --git a/extension/src/app/Actions.tsx b/extension/src/app/Actions.tsx index 216e59af..656bb6d6 100644 --- a/extension/src/app/Actions.tsx +++ b/extension/src/app/Actions.tsx @@ -29,11 +29,7 @@ interface OwnProps { } type Props = StateProps & DispatchProps & OwnProps; -declare global { - interface Window { - isElectron?: boolean; - } -} +const isElectron = navigator.userAgent.includes('Electron'); function sendMessage(message: SingleMessage) { chrome.runtime.sendMessage(message); @@ -98,7 +94,7 @@ class Actions extends Component { )} - {!window.isElectron && ( + {!isElectron && ( )} - {!window.isElectron && ( + {!isElectron && (