From c418badc7c8eabe97113c3ec4de0f3787c3ea568 Mon Sep 17 00:00:00 2001 From: Dermot Duffy Date: Sat, 23 Apr 2022 16:55:36 -0700 Subject: [PATCH] Formatting fixes. --- src/common.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/common.ts b/src/common.ts index 3f07ba94..f3308871 100644 --- a/src/common.ts +++ b/src/common.ts @@ -475,7 +475,10 @@ export function getCameraID( return ( (typeof config?.id === 'string' && config.id) || (typeof config?.camera_entity === 'string' && config.camera_entity) || - (typeof config?.webrtc_card === 'object' && config.webrtc_card && typeof config.webrtc_card['entity'] === 'string' && config.webrtc_card['entity']) || + (typeof config?.webrtc_card === 'object' && + config.webrtc_card && + typeof config.webrtc_card['entity'] === 'string' && + config.webrtc_card['entity']) || (typeof config?.camera_name === 'string' && config.camera_name) || '' ); @@ -497,9 +500,16 @@ export function getCameraTitle( // used on raw configuration in the editor. return ( (typeof config?.title === 'string' && config.title) || - (typeof config?.camera_entity === 'string' ? getEntityTitle(hass, config.camera_entity) : '') || - (typeof config?.webrtc_card === 'object' && config.webrtc_card && typeof config.webrtc_card['entity'] === 'string' && config.webrtc_card['entity']) || - (typeof config?.camera_name === 'string' ? prettifyFrigateName(config.camera_name) : '') || + (typeof config?.camera_entity === 'string' + ? getEntityTitle(hass, config.camera_entity) + : '') || + (typeof config?.webrtc_card === 'object' && + config.webrtc_card && + typeof config.webrtc_card['entity'] === 'string' && + config.webrtc_card['entity']) || + (typeof config?.camera_name === 'string' + ? prettifyFrigateName(config.camera_name) + : '') || (typeof config?.id === 'string' && config.id) || '' );