make hasTranslation better

This commit is contained in:
Daniel LaCosse 2023-12-13 15:53:18 -05:00
parent 783e4f2ad4
commit b66664cd83

View file

@ -785,8 +785,16 @@ export class AppRoot extends polymerElementWithLocalize {
}
hasTranslation(key: string) {
const msg = this.localize(key);
return msg !== key && msg !== '';
let message;
try {
message = this.localize(key);
} catch (e) {
// failed to find translation
message = '';
}
return message !== key && message !== '';
}
showIntro() {