perf: skip hasScopeRef check if there are no scope vars

This commit is contained in:
Evan You 2019-10-16 15:32:48 -04:00
parent d69db0b2fd
commit b980ddb607

View File

@ -342,7 +342,7 @@ function hasScopeRef(
node: TemplateChildNode | IfBranchNode | SimpleExpressionNode | undefined,
ids: TransformContext['identifiers']
): boolean {
if (!node) {
if (!node || Object.keys(ids).length === 0) {
return false
}
switch (node.type) {