From 5468df2d22ec24848cb26c666be362e9a7aa44e5 Mon Sep 17 00:00:00 2001 From: DaehunGwak Date: Sun, 3 Jan 2021 01:07:00 +0900 Subject: [PATCH] fix empty locale option when first created When App component is created not using query parameter 'loc', locale data is empty. So add checking logic $route.query.loc --- quiz-app/src/App.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quiz-app/src/App.vue b/quiz-app/src/App.vue index 0e66a7a6..19bc4e5e 100644 --- a/quiz-app/src/App.vue +++ b/quiz-app/src/App.vue @@ -38,7 +38,9 @@ export default { }, }, created() { - this.locale = this.$route.query.loc; + if (this.$route.query.loc) { + this.locale = this.$route.query.loc; + } }, };