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 ddac258 commit 3b7c74e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/dev/i18n/integrate_locale_files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ export function verifyMessages(
if (defaultMessage) {
try {
const message = localizedMessagesMap.get(messageId)!;
if (message) {
verifyICUMessage(typeof message === 'string' ? message : message.text);
}
verifyICUMessage(typeof message === 'string' ? message : message?.text);
} catch (err) {
if (options.ignoreMalformed) {
localizedMessagesMap.delete(messageId);
Expand Down

0 comments on commit 3b7c74e

Please sign in to comment.