From ff661e3838cac204d309592d61c8f74512d99c5c Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Mon, 23 Jan 2017 13:14:19 +0100 Subject: [PATCH] Use "Walker" class instead of traverse() for Ember 1.13 compat --- transform-test-selector-params-to-hash-pairs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/transform-test-selector-params-to-hash-pairs.js b/transform-test-selector-params-to-hash-pairs.js index ed8568a4..4d317a47 100644 --- a/transform-test-selector-params-to-hash-pairs.js +++ b/transform-test-selector-params-to-hash-pairs.js @@ -12,10 +12,10 @@ function isTestSelectorParam(param) { TransformTestSelectorParamsToHashPairs.prototype.transform = function(ast) { var b = this.syntax.builders; - var traverse = this.syntax.traverse; + var walker = new this.syntax.Walker(); - traverse(ast, { - MustacheStatement: function(node) { + walker.visit(ast, function(node) { + if (node.type === 'MustacheStatement' || node.type === 'BlockStatement') { var testSelectorParams = []; var otherParams = []; @@ -24,7 +24,7 @@ TransformTestSelectorParamsToHashPairs.prototype.transform = function(ast) { testSelectorParams.push(param); } else { otherParams.push(param); - }; + } }); node.params = otherParams;