Преглед на файлове

refactor(compiler-vapor): simplify ast check

三咲智子 Kevin Deng преди 1 година
родител
ревизия
76595deefb
променени са 1 файла, в които са добавени 2 реда и са изтрити 5 реда
  1. 2 5
      packages/compiler-vapor/src/transforms/vSlot.ts

+ 2 - 5
packages/compiler-vapor/src/transforms/vSlot.ts

@@ -112,9 +112,6 @@ function createSlotBlock(
 }
 
 function isNonWhitespaceContent(node: TemplateChildNode): boolean {
-  if (node.type !== NodeTypes.TEXT && node.type !== NodeTypes.TEXT_CALL)
-    return true
-  return node.type === NodeTypes.TEXT
-    ? !!node.content.trim()
-    : isNonWhitespaceContent(node.content)
+  if (node.type !== NodeTypes.TEXT) return true
+  return !!node.content.trim()
 }