Skip to content
This repository has been archived by the owner on May 7, 2019. It is now read-only.

Commit

Permalink
fixed host-context logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jtzero authored Jul 14, 2016
1 parent 9c7e7b3 commit 334527a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postcss-host.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module.exports = postcss.plugin('postcss-host', function () {
var replaced = [];
rule.selectors.forEach(function (selector) {
var idx = selector.indexOf(':host');
if (idx === -1 && selector.indexOf(':host-context') !== idx) {
replaced.push(':host' + selector);
if (idx === -1 || selector.indexOf(':host-context') !== idx) {
replaced.push(':host ' + selector);
} else {
replaced.push(selector);
}
Expand Down

0 comments on commit 334527a

Please sign in to comment.