Skip to content

Commit

Permalink
feat: avoid displaying the key until loading
Browse files Browse the repository at this point in the history
  • Loading branch information
rozsazoltan authored Feb 24, 2024
1 parent cebef3c commit 817516d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export class I18n {
value = this.findTranslation(key.replace(/\//g, '.'))
}

this.activeMessages[key] = this.isValid(value) ? value : key
this.activeMessages[key] = this.isValid(value) ? value : (this.isLoaded() ? key : '')
})

return computed(() => this.makeReplacements(this.activeMessages[key], replacements))
Expand Down

0 comments on commit 817516d

Please sign in to comment.