mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[7.x] [APM]: Fix render error when license has not been loaded… (#54777)
This commit is contained in:
parent
17135a6cb2
commit
51dccb9555
1 changed files with 3 additions and 2 deletions
|
@ -16,8 +16,9 @@ export const LicenseContext = React.createContext<ILicense | undefined>(
|
|||
|
||||
export function LicenseProvider({ children }: { children: React.ReactChild }) {
|
||||
const { license$ } = useApmPluginContext().plugins.licensing;
|
||||
const license = useObservable(license$, { isActive: true } as ILicense);
|
||||
const hasInvalidLicense = !license.isActive;
|
||||
const license = useObservable(license$);
|
||||
// if license is not loaded yet, consider it valid
|
||||
const hasInvalidLicense = license?.isActive === false;
|
||||
|
||||
// if license is invalid show an error message
|
||||
if (hasInvalidLicense) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue