Merge pull request #3657 from adamdmharvey/lgtm-review
Address three LGTM/Semmle code scanning findings
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user