From 134e932322be48ab4be9f42435a326305120f14d Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sat, 26 Oct 2019 17:51:55 +0300 Subject: [PATCH] fix(types): fix VNodeTypes unique symbols (#387) --- packages/runtime-core/src/suspense.ts | 2 +- packages/runtime-core/src/vnode.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/runtime-core/src/suspense.ts b/packages/runtime-core/src/suspense.ts index c852f424..de81f1ab 100644 --- a/packages/runtime-core/src/suspense.ts +++ b/packages/runtime-core/src/suspense.ts @@ -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, diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts index fec19fe1..c59c6210 100644 --- a/packages/runtime-core/src/vnode.ts +++ b/packages/runtime-core/src/vnode.ts @@ -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