-
-
Notifications
You must be signed in to change notification settings - Fork 471
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
fix: Add null
check to removeStyleElement
#245
fix: Add null
check to removeStyleElement
#245
Conversation
removeStyleElement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@brandondurham Please sign the CLA, in case the bot bugs close and reopen the PR to trigger it again |
removeStyleElement
removeStyleElement
lib/addStyles.js
Outdated
style.parentNode.removeChild(style); | ||
|
||
var idx = stylesInsertedAtTop.indexOf(style); | ||
|
||
if(idx >= 0) { | ||
if (idx >= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change not related lines to PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that. Subconscious flick of the wrist. Should be good to go.
@brandondurham Thx |
removeStyleElement
null
check to removeStyleElement
What kind of change does this PR introduce?
bugfix
Did you add tests for your changes?
Private function… no tests.
If relevant, did you update the README?
Not relevant.
Summary
style-loader was choking on the CSS Modules
composes
feature and throwing a fatal error. Adding a check to theremoveStyleElement
function inlib/addStyles.js
seems to solve the problem.Does this PR introduce a breaking change?
No.
Closes #182