Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion local-cli/link/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ const linkDependency = (platforms, project, dependency) => {
return null;
}

const isInstalled = linkConfig.isInstalled(project[platform], dependency.config[platform]);
const isInstalledParameter = platform == "android" ? dependency.name : dependency.config[platform];
const isInstalled = linkConfig.isInstalled(project[platform], isInstalledParameter);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, although I would be much more in favor of having it use the same signature.

CC: @Kureev

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing is dependency.config[platform] does not contain dependency.name, should we add dependencyName to dependency.config[platform] object then?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlink suffers the same issue for android and iOS unlink is broken

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just add the name parameter to the isInstalled signature.


if (isInstalled) {
log.info(chalk.grey(`Platform '${platform}' module ${dependency.name} is already linked`));
Expand Down