mirror of https://github.com/vuejs/core.git
feat: support browser for walkIdentifiers
This commit is contained in:
parent
7201bf338d
commit
7874664d29
|
@ -30,10 +30,6 @@ export function walkIdentifiers(
|
||||||
parentStack: Node[] = [],
|
parentStack: Node[] = [],
|
||||||
knownIds: Record<string, number> = Object.create(null),
|
knownIds: Record<string, number> = Object.create(null),
|
||||||
): void {
|
): void {
|
||||||
if (__BROWSER__) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const rootExp =
|
const rootExp =
|
||||||
root.type === 'Program'
|
root.type === 'Program'
|
||||||
? root.body[0].type === 'ExpressionStatement' && root.body[0].expression
|
? root.body[0].type === 'ExpressionStatement' && root.body[0].expression
|
||||||
|
@ -110,10 +106,6 @@ export function isReferencedIdentifier(
|
||||||
parent: Node | null,
|
parent: Node | null,
|
||||||
parentStack: Node[],
|
parentStack: Node[],
|
||||||
): boolean {
|
): boolean {
|
||||||
if (__BROWSER__) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue