Skip to content

Commit

Permalink
fix: insert rules at the end of stylesheet
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Apr 22, 2018
1 parent e42a692 commit 752de24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ exports.create = function (config) {

renderer.putRaw = function (rawCssRule) {
if (process.env.NODE_ENV === 'production') {
renderer.sh.sheet.insertRule(rawCssRule, 0);
var sheet = renderer.sh.sheet;
sheet.insertRule(rawCssRule, sheet.cssRules.length);
} else {
renderer.sh.appendChild(document.createTextNode(rawCssRule));
}
Expand Down

0 comments on commit 752de24

Please sign in to comment.