Skip to content

Commit

Permalink
refactor special directive after generation
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Apr 7, 2017
1 parent 6b1a2b0 commit 5342b8a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -1232,15 +1232,15 @@
if ((specialDirective = specialDirectives[attrName]) !== undefined) {
// Generate Special Directives
// Special directive found that generates code after initial generation, push it to its known special directives to run afterGenerate later
if (specialDirective.afterGenerate) {
if (!vnode.specialDirectivesAfter) {
if (specialDirective.afterGenerate !== undefined) {
if (vnode.specialDirectivesAfter === undefined) {
vnode.specialDirectivesAfter = {};
}
vnode.specialDirectivesAfter[attr] = attrInfo;
}

// Invoke any special directives that need to change values of props during code generation
if (specialDirective.duringPropGenerate) {
if (specialDirective.duringPropGenerate !== undefined) {
generatedObject += specialDirective.duringPropGenerate(attrInfo.value, attrInfo.meta, vnode);
}

Expand Down
Loading

0 comments on commit 5342b8a

Please sign in to comment.