@discord/intl 0.18.0-canary.8b215fd → 0.18.0-rc.0

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.
@@ -100,8 +100,8 @@ class MessageLoader {
100
100
  return undefined;
101
101
  }
102
102
  // Then try to return the loaded message.
103
- const content = this.messages[locale][key];
104
- if (content != null) {
103
+ if (key in this.messages[locale]) {
104
+ const content = this.messages[locale][key];
105
105
  const message = new message_1.InternalIntlMessage(content, locale);
106
106
  ((_b = (_c = this._parseCache)[locale]) !== null && _b !== void 0 ? _b : (_c[locale] = {}))[key] = message;
107
107
  return message;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discord/intl",
3
- "version": "0.18.0-canary.8b215fd",
3
+ "version": "0.18.0-rc.0",
4
4
  "license": "MIT",
5
5
  "description": "Client runtime for managing messages and translations in a React project.",
6
6
  "main": "./dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "@formatjs/intl": "^2.10.1",
24
24
  "@intrnl/xxhash64": "^0.1.2",
25
25
  "intl-messageformat": "^10.5.11",
26
- "@discord/intl-ast": "0.18.0"
26
+ "@discord/intl-ast": "0.18.0-rc.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@formatjs/intl-durationformat": "^0.7.3",
@@ -179,8 +179,8 @@ export class MessageLoader {
179
179
  }
180
180
 
181
181
  // Then try to return the loaded message.
182
- const content = this.messages[locale][key];
183
- if (content != null) {
182
+ if (key in this.messages[locale]) {
183
+ const content = this.messages[locale][key];
184
184
  const message = new InternalIntlMessage(content, locale);
185
185
  (this._parseCache[locale] ??= {})[key] = message;
186
186
  return message;