From 6ca11461cea3000849ecaae9bf11eeb81f483313 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Mon, 12 Jun 2017 04:13:39 +0430 Subject: [PATCH] feat(nuxt-child): bind transition calls to parent WIP for #566 --- lib/app/components/nuxt-child.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/app/components/nuxt-child.js b/lib/app/components/nuxt-child.js index becc3b82a8..492e002ac8 100644 --- a/lib/app/components/nuxt-child.js +++ b/lib/app/components/nuxt-child.js @@ -30,7 +30,7 @@ export default { functional: true, render (h, { parent, data }) { data.nuxtChild = true - + const _parent = parent const transitions = parent.$nuxt.nuxt.transitions const defaultTransition = parent.$nuxt.nuxt.defaultTransition let depth = 0 @@ -51,7 +51,7 @@ export default { let listeners = {} listenersKeys.forEach((key) => { if (typeof transition[key] === 'function') { - listeners[key] = transition[key] + listeners[key] = transition[key].bind(_parent) } }) return h('transition', {