]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: use Boolean to filter empty (#228)
authorCong Min <i@congm.in>
Sat, 12 Oct 2019 14:55:35 +0000 (22:55 +0800)
committerEvan You <yyx990803@gmail.com>
Sat, 12 Oct 2019 14:55:35 +0000 (10:55 -0400)
packages/runtime-test/src/serialize.ts
scripts/build.js

index 72ed03d2e0d09c8348857dc4b81ea0a344c85b10..57a3e7a5e21327b5215bff8e67e794f973618335 100644 (file)
@@ -42,7 +42,7 @@ function serializeElement(
       const value = node.props[key]
       return isOn(key) || value == null ? `` : `${key}=${JSON.stringify(value)}`
     })
-    .filter(_ => _)
+    .filter(Boolean)
     .join(' ')
   const padding = indent ? ` `.repeat(indent).repeat(depth) : ``
   return (
index 9bc27c60a72da0c31393bc1de065097cf67c0a2e..2e576d7a39551fef8313238f839b0dcbebecd4c5 100644 (file)
@@ -68,7 +68,7 @@ async function build(target) {
         args.types ? `TYPES:true` : ``,
         prodOnly ? `PROD_ONLY:true` : ``
       ]
-        .filter(_ => _)
+        .filter(Boolean)
         .join(',')
     ],
     { stdio: 'inherit' }