Skip to content

Commit

Permalink
check if message is defined first
Browse files Browse the repository at this point in the history
  • Loading branch information
Bamieh committed Aug 13, 2020
1 parent 03bef15 commit ddac258
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dev/i18n/integrate_locale_files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ export function verifyMessages(
if (defaultMessage) {
try {
const message = localizedMessagesMap.get(messageId)!;
verifyICUMessage(typeof message === 'string' ? message : message.text);
if (message) {
verifyICUMessage(typeof message === 'string' ? message : message.text);
}
} catch (err) {
if (options.ignoreMalformed) {
localizedMessagesMap.delete(messageId);
Expand Down

0 comments on commit ddac258

Please sign in to comment.