-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vuejs#7913): Prevent erroneous warning when using <slot> inside s…
…lot-scope Because slotNodes inside a slot-scope context are already set to _rendered = true after initial render, the warning for duplicate slot presence always fires when a slot-scope prop change triggers a re-render. With this change, the compiler tracks whether any slot-scoped elements have been encountered at the point the slot is compiled. If so, the direct ancestors of the slot are checked for slot-scope presence, and if found, the warning is supressed. This is admittedly not a perfect solution, as within a slot-scope context the warning now does not fire even when there _are_ duplicate slots, but I couldn't find a good way to get around that. fix vuejs#7913
- Loading branch information
Showing
3 changed files
with
19 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters