@discord/intl 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/format.js +1 -1
- package/package.json +1 -1
- package/src/format.ts +1 -1
package/dist/format.js
CHANGED
|
@@ -129,7 +129,7 @@ function bindFormatValuesWithBuilder(builder, nodes, locales, formatters, format
|
|
|
129
129
|
: undefined;
|
|
130
130
|
var scaledValue =
|
|
131
131
|
// @ts-expect-error This is a weird cast that's not accurate, but works in the short term.
|
|
132
|
-
typeof value !== 'number' ? value : ((_b =
|
|
132
|
+
typeof value !== 'number' ? value : value * ((_b = style === null || style === void 0 ? void 0 : style.scale) !== null && _b !== void 0 ? _b : 1);
|
|
133
133
|
builder.pushLiteralText(formatters.getNumberFormat(locales, style).format(scaledValue));
|
|
134
134
|
break;
|
|
135
135
|
}
|
package/package.json
CHANGED
package/src/format.ts
CHANGED
|
@@ -137,7 +137,7 @@ export function bindFormatValuesWithBuilder<T, Builder extends FormatBuilder<T>>
|
|
|
137
137
|
: undefined;
|
|
138
138
|
const scaledValue =
|
|
139
139
|
// @ts-expect-error This is a weird cast that's not accurate, but works in the short term.
|
|
140
|
-
typeof value !== 'number' ? (value as number) : (
|
|
140
|
+
typeof value !== 'number' ? (value as number) : (value as number) * (style?.scale ?? 1);
|
|
141
141
|
builder.pushLiteralText(formatters.getNumberFormat(locales, style).format(scaledValue));
|
|
142
142
|
break;
|
|
143
143
|
}
|