mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-07 02:18:07 +01:00
refactor(web): async routing
This commit is contained in:
committed by
Blake Blackshear
parent
24ec13e36d
commit
7aee28d080
@@ -50,7 +50,7 @@ export default function CameraImage({ camera, onload, searchParams = '' }) {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!scaledHeight) {
|
||||
if (!scaledHeight || !canvasRef.current) {
|
||||
return;
|
||||
}
|
||||
img.src = `${apiHost}/api/${name}/latest.jpg?h=${scaledHeight}${searchParams ? `&${searchParams}` : ''}`;
|
||||
|
||||
Reference in New Issue
Block a user