ember-ast-helpers
Advanced tools
Comparing version
@@ -153,4 +153,4 @@ import { BuildAttrContent } from './html'; | ||
_transformMustachePairs(node: AST.MustacheStatement): void; | ||
_replaceYield(node: AST.MustacheStatement): AST.Statement[] | undefined; | ||
_replaceYield(node: AST.MustacheStatement): AST.Statement[] | null | undefined; | ||
_transformMustacheInCollection(siblings: AST.Statement[], i: number): boolean; | ||
} |
@@ -516,5 +516,11 @@ "use strict"; | ||
_replaceYield(node) { | ||
if (this.node.type === 'BlockStatement' && node.path.original === 'yield') { | ||
if (node.path.original !== 'yield') { | ||
return; | ||
} | ||
if (this.node.type === 'BlockStatement') { | ||
return this.node.program.body; | ||
} | ||
else { | ||
return null; | ||
} | ||
} | ||
@@ -521,0 +527,0 @@ _transformMustacheInCollection(siblings, i) { |
{ | ||
"name": "ember-ast-helpers", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"description": "Utility belt to level-up your Ember AST transforms", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
44464
0.22%982
0.61%