diff --git a/strip-test-selectors.js b/strip-test-selectors.js index a6262a9f..15a93878 100644 --- a/strip-test-selectors.js +++ b/strip-test-selectors.js @@ -8,11 +8,6 @@ function isTestSelector(attribute) { return TEST_SELECTOR_PREFIX.test(attribute); } -function stripTestSelectors(node) { - node.params = node.params.filter(param => !isTestSelector(param.original)); - node.hash.pairs = node.hash.pairs.filter(pair => !isTestSelector(pair.key)); -} - function transform() { return { name: 'strip-test-selectors', @@ -23,11 +18,13 @@ function transform() { }, MustacheStatement(node) { - stripTestSelectors(node); + node.params = node.params.filter(param => !isTestSelector(param.original)); + node.hash.pairs = node.hash.pairs.filter(pair => !isTestSelector(pair.key)); }, BlockStatement(node) { - stripTestSelectors(node); + node.params = node.params.filter(param => !isTestSelector(param.original)); + node.hash.pairs = node.hash.pairs.filter(pair => !isTestSelector(pair.key)); }, } };