Skip to content

Commit

Permalink
Fix issues with pollParams and link
Browse files Browse the repository at this point in the history
  • Loading branch information
grabbou committed Mar 20, 2018
1 parent 85b690f commit ca8ce83
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions local-cli/link/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ log.heading = 'rnpm-link';

const dedupeAssets = (assets) => uniqBy(assets, asset => path.basename(asset));

const linkDependency = (platforms, project, dependency) => {
const linkDependency = async (platforms, project, dependency) => {
const params = await pollParams(dependency.config.params);

Object.keys(platforms || {})
.forEach(platform => {
if (!project[platform] || !dependency.config[platform]) {
Expand All @@ -56,18 +58,16 @@ const linkDependency = (platforms, project, dependency) => {
return null;
}

return pollParams(dependency.config.params).then(params => {
log.info(`Linking ${dependency.name} ${platform} dependency`);
log.info(`Linking ${dependency.name} ${platform} dependency`);

linkConfig.register(
dependency.name,
dependency.config[platform],
params,
project[platform]
);
linkConfig.register(
dependency.name,
dependency.config[platform],
params,
project[platform]
);

log.info(`Platform '${platform}' module ${dependency.name} has been successfully linked`);
});
log.info(`Platform '${platform}' module ${dependency.name} has been successfully linked`);
});
};

Expand Down

0 comments on commit ca8ce83

Please sign in to comment.