@@ -11,7 +11,7 @@ import { isVaporComponent } from '../component'
1111import type { Block , TransitionBlock } from '../block'
1212import { isArray } from '@vue/shared'
1313import { isHydrating , logMismatchError } from '../dom/hydration'
14- import { DynamicFragment , VaporFragment } from '../fragment'
14+ import { DynamicFragment , VaporFragment , isFragment } from '../fragment'
1515
1616export function applyVShow ( target : Block , source : ( ) => any ) : void {
1717 if ( isVaporComponent ( target ) ) {
@@ -47,21 +47,18 @@ function setDisplay(target: Block, value: unknown): void {
4747 if ( target . length === 0 ) return
4848 if ( target . length === 1 ) return setDisplay ( target [ 0 ] , value )
4949 }
50- if ( target instanceof DynamicFragment ) {
51- return setDisplay ( target . nodes , value )
52- }
53- if ( target instanceof VaporFragment && target . insert ) {
50+ if ( isFragment ( target ) ) {
5451 return setDisplay ( target . nodes , value )
5552 }
5653
57- const { $transition } = target as TransitionBlock
5854 if ( target instanceof Element ) {
5955 const el = target as VShowElement
6056 if ( ! ( vShowOriginalDisplay in el ) ) {
6157 el [ vShowOriginalDisplay ] =
6258 el . style . display === 'none' ? '' : el . style . display
6359 }
6460
61+ const { $transition } = target as TransitionBlock
6562 if ( $transition ) {
6663 if ( value ) {
6764 $transition . beforeEnter ( target )
0 commit comments