Skip to content

Commit

Permalink
👕 refactor(tc): tweak logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed May 25, 2017
1 parent bf39fff commit f9c5c1b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,10 @@ export default class VueI18n {
...values: any
): any {
if (!key) { return '' }
if (choice !== undefined) {
return fetchChoice(this._t(key, _locale, messages, host, ...values), choice)
} else {
return fetchChoice(this._t(key, _locale, messages, host, ...values), 1)
if (choice === undefined) {
choice = 1
}
return fetchChoice(this._t(key, _locale, messages, host, ...values), choice)
}

tc (key: Path, choice?: number, ...values: any): TranslateResult {
Expand Down

0 comments on commit f9c5c1b

Please sign in to comment.