Skip to content

Commit

Permalink
Move __activateDir into check instead of replace
Browse files Browse the repository at this point in the history
Remove unused imports in testing
  • Loading branch information
dfreedm committed Nov 7, 2018
1 parent 08bc1ff commit ec00d26
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions lib/mixins/dir-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export const DirMixin = dedupingMixin((base) => {
cssText = super._processStyleText(cssText, baseURI);
if (!SHIM_SHADOW && DIR_CHECK.test(cssText)) {
cssText = this._replaceDirInCssText(cssText);
this.__activateDir = true;
}
return cssText;
}
Expand All @@ -129,9 +130,6 @@ export const DirMixin = dedupingMixin((base) => {
let replacedText = text;
replacedText = replacedText.replace(HOST_DIR, HOST_DIR_REPLACMENT);
replacedText = replacedText.replace(EL_DIR, EL_DIR_REPLACMENT);
if (text !== replacedText) {
this.__activateDir = true;
}
return replacedText;
}

Expand Down
2 changes: 0 additions & 2 deletions test/unit/dir.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
<script src="../../node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
<script src="wct-browser-config.js"></script>
<script src="../../node_modules/wct-browser-legacy/browser.js"></script>
<script type="module" src="../../polymer-legacy.js"></script>
<script type="module" src="../../lib/mixins/dir-mixin.js"></script>
</head>
<body>
<!--
Expand Down

0 comments on commit ec00d26

Please sign in to comment.