mirror of
https://github.com/microsoft/Web-Dev-For-Beginners.git
synced 2025-08-19 13:02:08 +02:00
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
This commit is contained in:
@@ -38,7 +38,9 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
if (this.$route.query.loc) {
|
||||
this.locale = this.$route.query.loc;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user