Strict mode SwitchAccount and SwitchSubscription files (#940)

This commit is contained in:
vaidankarswapnil 2021-07-15 21:24:07 +05:30 committed by GitHub
parent b115bb34ca
commit 8a3929775b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -26,7 +26,7 @@ export const SwitchAccount: FunctionComponent<Props> = ({
data: account,
}))}
onChange={(_, option) => {
setSelectedAccountName(String(option.key));
setSelectedAccountName(String(option?.key));
dismissMenu();
}}
defaultSelectedKey={selectedAccount?.name}

View File

@ -26,7 +26,7 @@ export const SwitchSubscription: FunctionComponent<Props> = ({
};
})}
onChange={(_, option) => {
setSelectedSubscriptionId(String(option.key));
setSelectedSubscriptionId(String(option?.key));
}}
defaultSelectedKey={selectedSubscription?.subscriptionId}
placeholder={subscriptions && subscriptions.length === 0 ? "No Subscriptions Found" : "Select a Subscription"}

View File

@ -140,7 +140,9 @@
"./src/quickstart.ts",
"./src/setupTests.ts",
"./src/userContext.test.ts",
"src/Common/EntityValue.tsx"
"src/Common/EntityValue.tsx",
"./src/Platform/Hosted/Components/SwitchAccount.tsx",
"./src/Platform/Hosted/Components/SwitchSubscription.tsx",
],
"include": [
"src/CellOutputViewer/transforms/**/*",