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 and thetutlage committed Dec 10, 2024
1 parent 30acba1 commit 5ca9c6d
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 5ca9c6d

Please sign in to comment.