diff --git a/x-pack/legacy/plugins/apm/public/context/LicenseContext/index.tsx b/x-pack/legacy/plugins/apm/public/context/LicenseContext/index.tsx index 6228205ad6029..c2c2b0732d4ac 100644 --- a/x-pack/legacy/plugins/apm/public/context/LicenseContext/index.tsx +++ b/x-pack/legacy/plugins/apm/public/context/LicenseContext/index.tsx @@ -16,8 +16,8 @@ export const LicenseContext = React.createContext( export function LicenseProvider({ children }: { children: React.ReactChild }) { const { license$ } = useApmPluginContext().plugins.licensing; - const license = useObservable(license$); - const hasInvalidLicense = !license?.isActive; + const license = useObservable(license$, { isActive: true } as ILicense); + const hasInvalidLicense = !license.isActive; // if license is invalid show an error message if (hasInvalidLicense) {