Explorar o código

remove v-cloak for conditional compiles (fix #1028)

Evan You %!s(int64=11) %!d(string=hai) anos
pai
achega
90cdcdb57f
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/directive.js

+ 4 - 1
src/directive.js

@@ -52,7 +52,10 @@ var p = Directive.prototype
  */
 
 p._bind = function (def) {
-  if (this.name !== 'cloak' && this.el && this.el.removeAttribute) {
+  if (
+    (this.name !== 'cloak' || this.vm._isCompiled) &&
+    this.el && this.el.removeAttribute
+  ) {
     this.el.removeAttribute(config.prefix + this.name)
   }
   if (typeof def === 'function') {