From 3de33b338d3f8afbdb950db1cd4a0c16543c6a98 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 20 Apr 2016 15:06:45 -0400 Subject: [PATCH] fix ref --- src/compiler/codegen/directives/ref.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/codegen/directives/ref.js b/src/compiler/codegen/directives/ref.js index b03417cb..91cdbdb9 100644 --- a/src/compiler/codegen/directives/ref.js +++ b/src/compiler/codegen/directives/ref.js @@ -11,7 +11,7 @@ export function ref (el, dir) { parent = parent.parent } // __registerRef__(name, ref, vFor?, remove?) - const code = `__registerRef__("${dir.arg}", n1.data.child || n1.elm, ${isFor ? 'true' : 'false'}` + const code = `__registerRef__("${dir.arg}", n1.child || n1.elm, ${isFor ? 'true' : 'false'}` addHook(el, 'insert', `${code})`) addHook(el, 'destroy', `${code}, true)`) }