Fixes warning about NaN?

This commit is contained in:
psychedelicious 2022-11-11 20:59:38 +11:00 committed by blessedcoolant
parent b8bb46042c
commit 016551e036

View File

@ -150,7 +150,7 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => {
useEffect(() => {
const timer = setInterval(
() => setOffset((i) => (i + 2) % Number(fillPatternImage?.width)),
() => setOffset((i) => (i + 2) % (fillPatternImage?.width || 0)),
100
);
return () => clearInterval(timer);