From 5cfa9ac8081115cd58f3a78facafdf9eb06e9092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Thu, 19 Dec 2019 11:21:24 +0800 Subject: [PATCH] fix: demo snapshot --- docs/site/mobile.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/site/mobile.js b/docs/site/mobile.js index cda377ccc..0efee2043 100644 --- a/docs/site/mobile.js +++ b/docs/site/mobile.js @@ -45,13 +45,15 @@ Vue.mixin({ } }); -window.vueRouter.afterEach(to => { - const { lang } = (to.meta) || {}; +if (window.vueRouter) { + window.vueRouter.afterEach(to => { + const { lang } = to.meta || {}; - if (lang) { - Locale.use(lang); - } -}); + if (lang) { + Locale.use(lang); + } + }); +} // add some basic locale messages Locale.add({