Skip to content

Commit

Permalink
refactor: additional tweaks after revert
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 12, 2019
1 parent 6a2994e commit 794ad0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/compiler/parser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function parse (

function closeElement (element) {
if (!inVPre && !element.processed) {
element = processElement(element, options, currentParent)
element = processElement(element, options)
}
// tree management
if (!stack.length && element !== root) {
Expand Down Expand Up @@ -377,8 +377,7 @@ function processRawAttrs (el) {

export function processElement (
element: ASTElement,
options: CompilerOptions,
parent: ASTElement | undefined
options: CompilerOptions
) {
processKey(element)

Expand All @@ -391,7 +390,7 @@ export function processElement (
)

processRef(element)
processSlot(element, parent)
processSlot(element)
processComponent(element)
for (let i = 0; i < transforms.length; i++) {
element = transforms[i](element, options) || element
Expand Down
2 changes: 1 addition & 1 deletion test/unit/features/component/component-scoped-slot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ describe('Component scoped slot', () => {
// new in 2.6, unifying all slots as functions
it('non-scoped slots should also be available on $scopedSlots', () => {
const vm = new Vue({
template: `<foo>before <div slot="bar">{{ $slot.msg }}</div> after</foo>`,
template: `<foo>before <div slot="bar" slot-scope="{ msg }">{{ msg }}</div> after</foo>`,
components: {
foo: {
render(h) {
Expand Down

0 comments on commit 794ad0d

Please sign in to comment.