We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bccddbf commit 4cf1232Copy full SHA for 4cf1232
lib/default-theme/SearchBox.vue
@@ -92,11 +92,9 @@ export default {
92
},
93
methods: {
94
getPageLocalePath (page) {
95
- const { locales } = this.$site
96
- for (let i = 0; i < locales.length; i++) {
97
- const localePath = locales[i].path
+ for (const localePath in this.$site.locales || {}) {
98
if (localePath !== '/' && page.path.indexOf(localePath) === 0) {
99
- return locales[i].path
+ return localePath
100
}
101
102
return '/'
0 commit comments