We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 655020a commit ac59a6aCopy full SHA for ac59a6a
src/i18n.ts
@@ -371,15 +371,14 @@ export function useI18n<
371
372
const global = i18n.global
373
374
- let emptyOption = false
375
// prettier-ignore
376
- const scope: I18nScope = (emptyOption = isEmptyObject(options)) // eslint-disable-line no-cond-assign
+ const scope: I18nScope = isEmptyObject(options)
377
? 'global'
378
: !options.useScope
379
? 'local'
380
: options.useScope
381
382
- if (emptyOption) {
+ if (scope === 'global') {
383
return global
384
}
385
@@ -398,8 +397,6 @@ export function useI18n<
398
397
composer = global
399
400
return composer
401
- } else if (scope === 'global') {
402
- return global
403
404
405
// scope 'local' case
0 commit comments