From cf12d18b4bbd70d66cb4cc5e7da1536298344cc6 Mon Sep 17 00:00:00 2001 From: Jian Zhang <49894777+ZhangJian-3ti@users.noreply.github.com> Date: Wed, 16 Oct 2019 10:18:55 +0800 Subject: [PATCH] refactor(runtime-core): isBuiltInTag -> use makeMap instead of Set (#307) --- packages/runtime-core/src/component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index 20328af9..0b6da59c 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -22,7 +22,8 @@ import { NOOP, isArray, isObject, - NO + NO, + makeMap } from '@vue/shared' import { SuspenseBoundary } from './suspense' import { @@ -224,8 +225,7 @@ export const setCurrentInstance = ( currentInstance = instance } -const BuiltInTagSet = new Set(['slot', 'component']) -const isBuiltInTag = (tag: string) => BuiltInTagSet.has(tag) +const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component') export function validateComponentName(name: string, config: AppConfig) { const appIsNativeTag = config.isNativeTag || NO