Parcourir la source

reuse no function from utils (#4322)

chengchao il y a 9 ans
Parent
commit
db3e1c7709
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/compiler/optimizer.js

+ 2 - 2
src/compiler/optimizer.js

@@ -1,6 +1,6 @@
 /* @flow */
 
-import { makeMap, isBuiltInTag, cached } from 'shared/util'
+import { makeMap, isBuiltInTag, cached, no } from 'shared/util'
 
 let isStaticKey
 let isPlatformReservedTag
@@ -21,7 +21,7 @@ const genStaticKeysCached = cached(genStaticKeys)
 export function optimize (root: ?ASTElement, options: CompilerOptions) {
   if (!root) return
   isStaticKey = genStaticKeysCached(options.staticKeys || '')
-  isPlatformReservedTag = options.isReservedTag || (() => false)
+  isPlatformReservedTag = options.isReservedTag || no
   // first pass: mark all non-static nodes.
   markStatic(root)
   // second pass: mark static roots.