]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(types): fix VNodeTypes unique symbols (#387)
authorDmitry Sharshakov <d3dx12.xx@gmail.com>
Sat, 26 Oct 2019 14:51:55 +0000 (17:51 +0300)
committerEvan You <yyx990803@gmail.com>
Sat, 26 Oct 2019 14:51:55 +0000 (10:51 -0400)
packages/runtime-core/src/suspense.ts
packages/runtime-core/src/vnode.ts

index c852f424b9cef155b0d05296d7963b8a04d46809..de81f1ab776221a189fe2a35e74a4f9df8c3f7c2 100644 (file)
@@ -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,
index fec19fe12b7e1eae4df1d8d706a3a91e260cc010..c59c62102e264b29dc6801d4f830ed79494fd589 100644 (file)
@@ -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