@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 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 = value * (style === null || style === void 0 ? void 0 : style.scale)) !== null && _b !== void 0 ? _b : 1);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discord/intl",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "license": "MIT",
5
5
  "description": "Client runtime for managing messages and translations in a React project.",
6
6
  "main": "./dist/index.js",
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) : ((value as number) * style?.scale ?? 1);
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
  }