Skip to content

Commit

Permalink
ensure slots are treated as dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Apr 2, 2017
1 parent 0b14b3d commit 9d11f0a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
10 changes: 9 additions & 1 deletion dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,15 @@

// Create a Call for the Element, or Register a Slot
var slotNameAttr = el.props.attrs.name;
var compiledCode = el.type === "slot" ? 'instance.$slots[\'' + (slotNameAttr && slotNameAttr.value || "default") + '\']' : createCall(el, parentEl, isPre);
var compiledCode = "";
if (el.type === "slot") {
if (parentEl) {
parentEl.dynamic = true;
}
compiledCode = 'instance.$slots[\'' + (slotNameAttr && slotNameAttr.value || "default") + '\']';
} else {
compiledCode = createCall(el, parentEl, isPre);
}

// Check for Special Directives that change the code after generation and run them
if (el.specialDirectivesAfter) {
Expand Down
Loading

0 comments on commit 9d11f0a

Please sign in to comment.