1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

Replace use of .flat with _.flatten, to accomodate chrome < 69 (#13520)

This commit is contained in:
Dan J Miller 2022-02-07 11:28:28 -03:30 committed by GitHub
parent 1297761de7
commit 8ad85e6413
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
import { flatten } from 'lodash';
import { permissionRpcMethods } from '@metamask/snap-controllers';
import { selectHooks } from '@metamask/rpc-methods';
import { ethErrors } from 'eth-rpc-errors';
@ -15,7 +16,7 @@ const handlerMap = allHandlers.reduce((map, handler) => {
const expectedHookNames = Array.from(
new Set(
allHandlers.map(({ hookNames }) => Object.keys(hookNames)).flat(),
flatten(allHandlers.map(({ hookNames }) => Object.keys(hookNames))),
).values(),
);