diff --git a/src/aipane/components/Aipane.tsx b/src/aipane/components/Aipane.tsx index 3a51a6e..e8fef80 100644 --- a/src/aipane/components/Aipane.tsx +++ b/src/aipane/components/Aipane.tsx @@ -94,7 +94,7 @@ const Aipane: React.FC = (props: AipaneProps): React.JSX.Element => * @state isOutlook * @description Whether the application is running in Outlook. */ - const [isOutlook, setIsOutlook] = useState(false); + const [isOutlook, setIsOutlook] = useState(null as boolean | null); /** * @constant listItems @@ -204,10 +204,12 @@ const Aipane: React.FC = (props: AipaneProps): React.JSX.Element => // Show the version number, the build date and the target use in the console // eslint-disable-next-line no-console - isOutlookClient().then((isOutlook) => { - setIsOutlook(isOutlook); - console.log(`Version: ${versionInfo.commit} Date: ${versionInfo.date} Runs on Outlook: ${isOutlook}`); - }); + if (isOutlook == null) { + isOutlookClient().then((isOutlook) => { + setIsOutlook(isOutlook); + console.log(`Version: ${versionInfo.commit} Date: ${versionInfo.date} Runs on Outlook: ${isOutlook}`); + }); + } return (