Merge pull request #3657 from adamdmharvey/lgtm-review

Address three LGTM/Semmle code scanning findings
This commit is contained in:
Patrik Oldsberg
2020-12-10 10:46:54 +01:00
committed by GitHub
7 changed files with 29 additions and 20 deletions
@@ -184,7 +184,7 @@ export class MicrosoftGraphClient {
const response = await this.requestApi(`organization/${tenantId}`);
if (response.status !== 200) {
await this.handleError('organization/${tenantId}', response);
await this.handleError(`organization/${tenantId}`, response);
}
return await response.json();
@@ -39,8 +39,8 @@ const getSelectedIndexOrDefault = (
/**
* Compound component, which allows you to define layout
* for EntityPage using Tabs as a subnavigation mechanism
* Constists of 2 parts: Tabbed.Layout and Tabbed.Content.
* for EntityPage using Tabs as a sub-navigation mechanism
* Consists of 2 parts: Tabbed.Layout and Tabbed.Content.
* Takes care of: tabs, routes, document titles, spacing around content
*
* @example
+1 -1
View File
@@ -50,7 +50,7 @@ const EntityPageSwitch = ({ EntityPage }: { EntityPage: ComponentType }) => {
const { entity, loading, error } = useEntity();
// Loading and error states
if (loading) return <EntityPageLayout />;
if (error || (!loading && !entity)) return <EntityNotFound />;
if (error || !entity) return <EntityNotFound />;
// Otherwise EntityPage provided from the App
// Note that EntityPage will include EntityPageLayout already