From 90db0aded8fe9540deca3d6d654aaa8c05587fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F?= Date: Wed, 10 Oct 2018 18:09:21 +0300 Subject: [PATCH] Update theme.js (#4068) More clear option --- examples/routes-meta/middleware/theme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/routes-meta/middleware/theme.js b/examples/routes-meta/middleware/theme.js index b2cd3f1759..91cb0e85e0 100644 --- a/examples/routes-meta/middleware/theme.js +++ b/examples/routes-meta/middleware/theme.js @@ -1,5 +1,5 @@ -export default ({ route, app }) => { +export default ({ route, store }) => { // Take the last value (latest route child) const theme = route.meta.reduce((theme, meta) => meta.theme || theme, 'light') - app.store.commit('SET_THEME', theme) + store.commit('SET_THEME', theme) }