Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply mappings when left-side is not a pkg but right-side is. #1271

Merged
merged 1 commit into from Sep 19, 2017

Conversation

m-mujica
Copy link
Contributor

Closes #1208

The app in the original issue runs ok with this branch https://github.com/m-mujica/steal-preact-compat-map

google chrome

@@ -122,6 +122,10 @@ function convertPropertyNamesAndValues (context, pkg, map, root, waiting) {
if(typeof name !== 'undefined' && typeof val !== 'undefined') {
clone[name] = val;
}
// keep map entry if the key isn't a package but value might
if (name && typeof val === "undefined") {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matthewp is this a naive "package" detection? I couldn't think of a different way of "knowing" the key/val is a package without a full npm name which we won't have in this case.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think this is fine.

@matthewp
Copy link
Member

lgtm

@m-mujica m-mujica merged commit 38d9835 into master Sep 19, 2017
@m-mujica m-mujica deleted the map-right branch September 19, 2017 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants