Skip to content

Commit

Permalink
feat: updated locale method to use default locale when none is provid…
Browse files Browse the repository at this point in the history
…ed (#136)
  • Loading branch information
leandrogehlen authored Dec 10, 2024
1 parent f0a5724 commit faca7d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/i18n_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ export class I18nManager {
/**
* Returns an instance of I18n for a given locale
*/
locale(locale: string) {
return new I18n(locale, this.#emitter, this)
locale(locale?: string) {
return new I18n(locale || this.defaultLocale, this.#emitter, this)
}

/**
Expand Down

0 comments on commit faca7d0

Please sign in to comment.