Skip to content

Commit 5bf4e84

Browse files
committed
chore: var shorten
1 parent 460423a commit 5bf4e84

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

packages/core/src/compiler.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ export default class Compiler {
175175
const formatter = this.options.customFormatters.[token.key];
176176
const formattingModuleRequest =
177177
formatter && 'module' in formatter ? formatter.module : null;
178-
const isLocaleSpecificFormattingModule =
179-
typeof formattingModuleRequest === 'function';
178+
const isModuleFn = typeof formattingModuleRequest === 'function';
180179
if (!this.options.customFormatters[token.key]) {
181180
if (token.key === 'date') {
182181
fn = this.setDateFormatter(token, args, pluralToken);
@@ -187,15 +186,13 @@ export default class Compiler {
187186
}
188187
}
189188

190-
if (!isLocaleSpecificFormattingModule) {
191-
args.push(JSON.stringify(this.plural.locale));
192-
}
189+
args.push(JSON.stringify(this.plural.locale));
193190
if (token.param) {
194191
if (pluralToken && this.options.strict) pluralToken = null;
195192
const arg = this.getFormatterArg(token, pluralToken);
196193
if (arg) args.push(arg);
197194
}
198-
fn = isLocaleSpecificFormattingModule
195+
fn = isModuleFn
199196
? identifier(`${token.key}__${this.plural.locale}`)
200197
: token.key;
201198
this.setFormatter(fn, token.key);

0 commit comments

Comments
 (0)