Skip to content

Commit 3ca1e7b

Browse files
authored
Add this. prefix to styleNamespace property (#58)
* styleNamespace context * fix snapshot
1 parent f4d3755 commit 3ca1e7b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/__tests__/__snapshots__/transform.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ foo
161161
});
162162
163163
~~~~~~~~~~
164-
<div class=\\"{{styleNamespace}} foo bar:baz\\" ...attributes>
164+
<div class=\\"{{this.styleNamespace}} foo bar:baz\\" ...attributes>
165165
foo
166166
</div>
167167
=========="

lib/transform/template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = function transformTemplate(
1414
// wrap existing template with root element
1515
let classNodes = [];
1616
if (options.hasComponentCSS) {
17-
classNodes.push(b.mustache('styleNamespace'));
17+
classNodes.push(b.mustache('this.styleNamespace'));
1818
}
1919
for (let className of classNames) {
2020
classNodes.push(b.text(className));

0 commit comments

Comments
 (0)