|
|
@@ -27,12 +27,14 @@ export function renderSlot (
|
|
|
} else {
|
|
|
const slotNodes = this.$slots[name]
|
|
|
// warn duplicate slot usage
|
|
|
- if (slotNodes && process.env.NODE_ENV !== 'production') {
|
|
|
- slotNodes._rendered && warn(
|
|
|
- `Duplicate presence of slot "${name}" found in the same render tree ` +
|
|
|
- `- this will likely cause render errors.`,
|
|
|
- this
|
|
|
- )
|
|
|
+ if (slotNodes) {
|
|
|
+ if (process.env.NODE_ENV !== 'production' && slotNodes._rendered) {
|
|
|
+ warn(
|
|
|
+ `Duplicate presence of slot "${name}" found in the same render tree ` +
|
|
|
+ `- this will likely cause render errors.`,
|
|
|
+ this
|
|
|
+ )
|
|
|
+ }
|
|
|
slotNodes._rendered = true
|
|
|
}
|
|
|
return slotNodes || fallback
|