Skip to content

Commit

Permalink
fix(types): fix VNodeTypes unique symbols (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsseng authored and yyx990803 committed Oct 26, 2019
1 parent 49914ef commit 134e932
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/runtime-core/src/suspense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isFunction } from '@vue/shared'
import { ComponentInternalInstance } from './component'
import { Slots } from './componentSlots'

export const SuspenseSymbol = __DEV__ ? Symbol('Suspense key') : Symbol()
export const SuspenseSymbol = Symbol(__DEV__ ? 'Suspense key' : undefined)

export interface SuspenseBoundary<
HostNode = any,
Expand Down
10 changes: 5 additions & 5 deletions packages/runtime-core/src/vnode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import { isReactive } from '@vue/reactivity'
import { AppContext } from './apiApp'
import { SuspenseBoundary } from './suspense'

export const Fragment = __DEV__ ? Symbol('Fragment') : Symbol()
export const Portal = __DEV__ ? Symbol('Portal') : Symbol()
export const Suspense = __DEV__ ? Symbol('Suspense') : Symbol()
export const Text = __DEV__ ? Symbol('Text') : Symbol()
export const Comment = __DEV__ ? Symbol('Comment') : Symbol()
export const Fragment = Symbol(__DEV__ ? 'Fragment' : undefined)
export const Portal = Symbol(__DEV__ ? 'Portal' : undefined)
export const Suspense = Symbol(__DEV__ ? 'Suspense' : undefined)
export const Text = Symbol(__DEV__ ? 'Text' : undefined)
export const Comment = Symbol(__DEV__ ? 'Comment' : undefined)

export type VNodeTypes =
| string
Expand Down

0 comments on commit 134e932

Please sign in to comment.