Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromvuejs/vue

Commit4fe1a95

Browse files
committed
fix: properly mark slot rendered flag in production mode
fixvuejs#6997
1 parente1657fd commit4fe1a95

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎src/core/instance/render-helpers/render-slot.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ export function renderSlot (
2727
}else{
2828
constslotNodes=this.$slots[name]
2929
// warn duplicate slot usage
30-
if(slotNodes&&process.env.NODE_ENV!=='production'){
31-
slotNodes._rendered&&warn(
32-
`Duplicate presence of slot "${name}" found in the same render tree `+
33-
`- this will likely cause render errors.`,
34-
this
35-
)
30+
if(slotNodes){
31+
if(process.env.NODE_ENV!=='production'&&slotNodes._rendered){
32+
warn(
33+
`Duplicate presence of slot "${name}" found in the same render tree `+
34+
`- this will likely cause render errors.`,
35+
this
36+
)
37+
}
3638
slotNodes._rendered=true
3739
}
3840
returnslotNodes||fallback

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp