use `uniqBy` for iteratee support
Summary: I noticed `uniq` does not take a second parameter the way it's being used here. I think the function what was intended is [uniqBy](https://lodash.com/docs/4.17.4#uniqBy) Closes https://github.com/facebook/react-native/pull/15615 Differential Revision: D5852155 Pulled By: hramos fbshipit-source-id: 892d0bf7f24d30c24620350f698ffb416907ccc5
This commit is contained in:
parent
7efd4fabfd
commit
df8d0d1db9
|
@ -14,7 +14,7 @@
|
|||
* run Flow. */
|
||||
const log = require('npmlog');
|
||||
const path = require('path');
|
||||
const uniq = require('lodash').uniq;
|
||||
const uniqBy = require('lodash').uniqBy;
|
||||
const flatten = require('lodash').flatten;
|
||||
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
|
||||
* found when Flow v0.54 was deployed. To see the error delete this comment and
|
||||
|
@ -45,7 +45,7 @@ import type {RNConfig} from '../core';
|
|||
|
||||
log.heading = 'rnpm-link';
|
||||
|
||||
const dedupeAssets = (assets) => uniq(assets, asset => path.basename(asset));
|
||||
const dedupeAssets = (assets) => uniqBy(assets, asset => path.basename(asset));
|
||||
|
||||
|
||||
const linkDependencyAndroid = (androidProject, dependency) => {
|
||||
|
|
Loading…
Reference in New Issue