From 0ce13257d6504f1b3fdb93667c7bcc45a2ed7bfd Mon Sep 17 00:00:00 2001 From: David <79108364+Phpvarious@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:07:55 +0200 Subject: [PATCH] Update camera.html --- core/template/dashboard/camera.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/template/dashboard/camera.html b/core/template/dashboard/camera.html index 785f273..6210cfd 100644 --- a/core/template/dashboard/camera.html +++ b/core/template/dashboard/camera.html @@ -54,10 +54,12 @@ maxWidth:eqLogic_#id#.width() + 'px' }); setTimeout(function(){ - Object.assign(document.querySelector('.eqLogic[data-eqLogic_id="#id#"] .directDisplay img').style, { - maxHeight:(eqLogic_#id#.height() - 60) + 'px', - maxWidth:eqLogic_#id#.width() + 'px' - }); + if (document.querySelector('.eqLogic[data-eqLogic_id="#id#"] .directDisplay img')) { + Object.assign(document.querySelector('.eqLogic[data-eqLogic_id="#id#"] .directDisplay img').style, { + maxHeight:(eqLogic_#id#.height() - 60) + 'px', + maxWidth:eqLogic_#id#.width() + 'px' + }); + } }, 1000); eqLogic_#id#.off('resize').on('resize',function(){