diff --git a/src/NiivueCanvas.tsx b/src/NiivueCanvas.tsx index 1a956f5..ed72ec0 100644 --- a/src/NiivueCanvas.tsx +++ b/src/NiivueCanvas.tsx @@ -51,7 +51,7 @@ const NiivueCanvas: React.FC = ({ const nvMutator = new NiivueMutator(nv); const setup = async () => { - await nv.attachToCanvas(canvasRef.current); + await nv.attachToCanvas(canvasRef.current as HTMLCanvasElement); onStart && onStart(nv); };