Skip to content

Commit

Permalink
fixed lodash usage broken by upgrade to lodash 4
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Jul 3, 2020
1 parent e4a16c7 commit f0f82f3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import Boom from 'boom';
import { pluck, mapValues, remove, zipObject } from 'lodash';
import { map, mapValues, remove, fromPairs } from 'lodash';
import { KibanaRequest } from 'src/core/server';
import { RecursiveReadonly } from '@kbn/utility-types';
import { ALERTS_FEATURE_ID } from '../../common';
Expand Down Expand Up @@ -117,7 +117,7 @@ export class AlertsAuthorization {
operation
);
} else {
const authorizedPrivileges = pluck(
const authorizedPrivileges = map(
privileges.filter((privilege) => privilege.authorized),
'privilege'
);
Expand Down Expand Up @@ -395,5 +395,5 @@ function asAuthorizedConsumers(
consumers: string[],
hasPrivileges: HasPrivileges
): AuthorizedConsumers {
return zipObject(consumers.map((feature) => [feature, hasPrivileges]));
return fromPairs(consumers.map((feature) => [feature, hasPrivileges]));
}

0 comments on commit f0f82f3

Please sign in to comment.