diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer.ts index a6e94d3715ca3..e875690f0e1cf 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import { fullPolicy, isOnPolicyDetailsPage } from './selectors'; +import { fullPolicy, isOnPolicyDetailsPage, license } from './selectors'; import { Immutable, PolicyConfig, @@ -45,7 +45,6 @@ export const initialPolicyDetailsState: () => Immutable = () total: 0, other: 0, }, - license: undefined, }); export const policyDetailsReducer: ImmutableReducer = ( @@ -108,6 +107,7 @@ export const policyDetailsReducer: ImmutableReducer) => { ); }; +/** Returns the license info fetched from the license service */ +export const license = (state: Immutable) => { + return state.license; +}; + /** Returns the policyId from the url */ export const policyIdFromParams: (state: Immutable) => string = createSelector( (state) => state.location,