File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
packages/runtime-vapor/src Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ import {
6060import { hmrReload , hmrRerender } from './hmr'
6161import { isHydrating , locateHydrationNode } from './dom/hydration'
6262import { insertionAnchor , insertionParent } from './insertionState'
63- import type { VaporTeleportImpl } from './components/Teleport'
63+ import { isVaporTeleport } from './components/Teleport'
6464
6565export { currentInstance } from '@vue/runtime-dom'
6666
@@ -93,8 +93,6 @@ export interface ObjectVaporComponent
9393
9494 name ?: string
9595 vapor ?: boolean
96-
97- __isTeleport ?: boolean
9896}
9997
10098interface SharedInternalOptions {
@@ -161,11 +159,8 @@ export function createComponent(
161159 }
162160
163161 // teleport
164- if ( component . __isTeleport ) {
165- const frag = ( component as typeof VaporTeleportImpl ) . process (
166- rawProps ! ,
167- rawSlots ! ,
168- )
162+ if ( isVaporTeleport ( component ) ) {
163+ const frag = component . process ( rawProps ! , rawSlots ! )
169164 if ( ! isHydrating && _insertionParent ) {
170165 insert ( frag , _insertionParent , _insertionAnchor )
171166 } else {
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export const VaporTeleportImpl = {
8585 } ,
8686}
8787
88- class TeleportFragment extends VaporFragment {
88+ export class TeleportFragment extends VaporFragment {
8989 anchor : Node
9090
9191 private targetStart ?: Node
@@ -242,6 +242,12 @@ export const VaporTeleport = VaporTeleportImpl as unknown as {
242242 }
243243}
244244
245+ export function isVaporTeleport (
246+ value : unknown ,
247+ ) : value is typeof VaporTeleportImpl {
248+ return value === VaporTeleportImpl
249+ }
250+
245251/**
246252 * dev only
247253 * during root component HMR reload, since the old component will be unmounted
You can’t perform that action at this time.
0 commit comments