Skip to content

Commit 6a5baf7

Browse files
committed
fix: modify the order of the locale setter
1 parent 13edb74 commit 6a5baf7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vue-i18n-core/src/composer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,17 +2110,17 @@ export function createComposer(options: any = {}): any {
21102110
const locale = computed({
21112111
get: () => _locale.value,
21122112
set: val => {
2113+
_context.locale = val
21132114
_locale.value = val
2114-
_context.locale = _locale.value
21152115
}
21162116
})
21172117

21182118
// fallbackLocale
21192119
const fallbackLocale = computed({
21202120
get: () => _fallbackLocale.value,
21212121
set: val => {
2122+
_context.fallbackLocale = val
21222123
_fallbackLocale.value = val
2123-
_context.fallbackLocale = _fallbackLocale.value
21242124
updateFallbackLocale(_context, _locale.value, val)
21252125
}
21262126
})

0 commit comments

Comments
 (0)