refactor(runtime-core): isBuiltInTag -> use makeMap instead of Set (#307)
This commit is contained in:
parent
11ea3d35d8
commit
cf12d18b4b
@ -22,7 +22,8 @@ import {
|
|||||||
NOOP,
|
NOOP,
|
||||||
isArray,
|
isArray,
|
||||||
isObject,
|
isObject,
|
||||||
NO
|
NO,
|
||||||
|
makeMap
|
||||||
} from '@vue/shared'
|
} from '@vue/shared'
|
||||||
import { SuspenseBoundary } from './suspense'
|
import { SuspenseBoundary } from './suspense'
|
||||||
import {
|
import {
|
||||||
@ -224,8 +225,7 @@ export const setCurrentInstance = (
|
|||||||
currentInstance = instance
|
currentInstance = instance
|
||||||
}
|
}
|
||||||
|
|
||||||
const BuiltInTagSet = new Set(['slot', 'component'])
|
const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component')
|
||||||
const isBuiltInTag = (tag: string) => BuiltInTagSet.has(tag)
|
|
||||||
|
|
||||||
export function validateComponentName(name: string, config: AppConfig) {
|
export function validateComponentName(name: string, config: AppConfig) {
|
||||||
const appIsNativeTag = config.isNativeTag || NO
|
const appIsNativeTag = config.isNativeTag || NO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user