fix(web): image loading for firefox

This commit is contained in:
Paul Armstrong 2021-01-27 07:29:59 -08:00 committed by Blake Blackshear
parent dcf7209706
commit 6482000d6b

View File

@ -38,7 +38,7 @@ export default function CameraImage({ camera, onload, searchParams = '' }) {
const img = useMemo(() => new Image(), [camera]); const img = useMemo(() => new Image(), [camera]);
img.onload = useCallback( img.onload = useCallback(
(event) => { (event) => {
const src = event.path[0].currentSrc; const src = event.srcElement.currentSrc;
setLoadedSrc(src); setLoadedSrc(src);
onload && onload(event); onload && onload(event);
}, },