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

Fixed negative refs #122

Merged
merged 3 commits into from
Mar 26, 2017
Merged

Conversation

tomasAlabes
Copy link
Contributor

@tomasAlabes tomasAlabes commented May 11, 2016

Style should be able to be injected if unuse was called more times than use.

myCss.use()
myCss.unuse()
myCss.unuse()

myCss.use() //should be valid, regardless of the double call to unuse

Following the GC idea, there are not "negative" amount of references, just none. Preventing adding more refs makes no sense.
This basically prevents refs from being negative, then the behavior is the same as before.

Makes no sense to not let the style be injected if `unuse` was called more times than `use`.
@tomasAlabes
Copy link
Contributor Author

@sokra any feedback on this?
Thanks

@bebraw
Copy link
Contributor

bebraw commented Mar 6, 2017

I would say #176 needs to go in first. After that adding a test for this PR would be possible. 👍

@bebraw
Copy link
Contributor

bebraw commented Mar 6, 2017

Alright. #176 is in. Please add a test and we'll merge.

@tomasAlabes
Copy link
Contributor Author

@bebraw test is in place. I ran it without my change and it failed, with my change 🚀
Thanks for your work in the loaders guys!

Copy link
Member

@michael-ciniawsky michael-ciniawsky left a comment

Choose a reason for hiding this comment

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

@michael-ciniawsky michael-ciniawsky merged commit f6f577a into webpack-contrib:master Mar 26, 2017
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.

4 participants