diff --git a/src/core/vdom/patch.js b/src/core/vdom/patch.js
index 40a4a0ccb45..2918e621b0d 100644
--- a/src/core/vdom/patch.js
+++ b/src/core/vdom/patch.js
@@ -697,6 +697,8 @@ export function createPatchFunction (backend) {
insert.fns[i]()
}
}
+ } else {
+ registerRef(ancestor)
}
ancestor = ancestor.parent
}
diff --git a/test/unit/features/ref.spec.js b/test/unit/features/ref.spec.js
index f82efe4513a..05efc4d5244 100644
--- a/test/unit/features/ref.spec.js
+++ b/test/unit/features/ref.spec.js
@@ -196,15 +196,25 @@ describe('ref', () => {
}
})
- it('should register on component with empty roots', () => {
+ it('should register on component with empty roots', done => {
const vm = new Vue({
template: '