Permalink
Browse files

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 #15615

Differential Revision: D5852155

Pulled By: hramos

fbshipit-source-id: 892d0bf7f24d30c24620350f698ffb416907ccc5
  • Loading branch information...
arahansen authored and facebook-github-bot committed Sep 18, 2017
1 parent 7efd4fa commit df8d0d1db9203cc87ad3682e6138b2a9ed714365
Showing with 2 additions and 2 deletions.
  1. +2 −2 local-cli/link/link.js
View
@@ -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) => {

0 comments on commit df8d0d1

Please sign in to comment.