Skip to content

Commit

Permalink
Use "Walker" class instead of traverse()
Browse files Browse the repository at this point in the history
for Ember 1.13 compat
  • Loading branch information
Turbo87 committed Jan 23, 2017
1 parent fb17788 commit ff661e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions transform-test-selector-params-to-hash-pairs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];

Expand All @@ -24,7 +24,7 @@ TransformTestSelectorParamsToHashPairs.prototype.transform = function(ast) {
testSelectorParams.push(param);
} else {
otherParams.push(param);
};
}
});

node.params = otherParams;
Expand Down

0 comments on commit ff661e3

Please sign in to comment.