Prechádzať zdrojové kódy

refactor: fix types

Evan You 8 rokov pred
rodič
commit
08660e876d

+ 5 - 3
src/platforms/weex/compiler/modules/recycle-list/index.js

@@ -33,9 +33,11 @@ function postTransformNode (el: ASTElement) {
 function genText (node) {
   const value = node.type === 3
     ? node.text
-    : node.tokens.length === 1
-      ? node.tokens[0]
-      : node.tokens
+    : node.type === 2
+      ? node.tokens.length === 1
+        ? node.tokens[0]
+        : node.tokens
+      : ''
   return JSON.stringify(value)
 }