Sfoglia il codice sorgente

reuse no function from utils (#4322)

chengchao 9 anni fa
parent
commit
db3e1c7709
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/compiler/optimizer.js

+ 2 - 2
src/compiler/optimizer.js

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