فهرست منبع

allow empty expression in terminal directives

rhyzx 10 سال پیش
والد
کامیت
12005adc8e
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      src/compiler/compile.js

+ 2 - 3
src/compiler/compile.js

@@ -587,11 +587,10 @@ function checkTerminalDirectives (el, options) {
   var value, dirName
   for (var i = 0, l = terminalDirectives.length; i < l; i++) {
     dirName = terminalDirectives[i]
-    /* eslint-disable no-cond-assign */
-    if (value = el.getAttribute('v-' + dirName)) {
+    value = el.getAttribute('v-' + dirName)
+    if (value != null) {
       return makeTerminalNodeLinkFn(el, dirName, value, options)
     }
-    /* eslint-enable no-cond-assign */
   }
 }