Fall back to use handler if translations broken (#4777)

This commit is contained in:
Paulus Schoutsen 2020-02-07 09:46:16 -08:00 committed by GitHub
parent 8a4c52aeb7
commit e5387e5806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,8 @@ class StepFlowPickHandler extends LitElement {
private _getHandlers = memoizeOne((h: string[], filter?: string) => {
const handlers: HandlerObj[] = h.map((handler) => {
return {
name: this.hass.localize(`component.${handler}.config.title`),
name:
this.hass.localize(`component.${handler}.config.title`) || handler,
slug: handler,
};
});