mirror of
https://github.com/discourse/discourse.git
synced 2025-03-12 03:25:31 +08:00

Currently, if MF definitions are missing (typically because there’s a compilation error), `I18n.messageFormat` will try to access `I18n._mfMessages.hasMessage` resulting in a crash that will in turn crash Ember. This patch addresses the issue by using the optional chaining operator making the `I18n.messageFormat` method return a "Missing Key" message. MF strings won’t be rendered properly, but the site will stay usable.