Skip to content

Commit

Permalink
refactor: check is function for fallback slots
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 1, 2021
1 parent d6ac00f commit f038000
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/core/instance/render-helpers/render-slot.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ export function renderSlot (
}
nodes =
scopedSlotFn(props) ||
(fallbackRender &&
(Array.isArray(fallbackRender) ? fallbackRender : fallbackRender()))
(typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender)
} else {
nodes =
this.$slots[name] ||
(fallbackRender &&
(Array.isArray(fallbackRender) ? fallbackRender : fallbackRender()))
(typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender)
}

const target = props && props.slot
Expand Down

0 comments on commit f038000

Please sign in to comment.