forked from Github/frigate
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