fixed variable declaration

This commit is contained in:
apoorv taneja
2024-02-02 19:32:39 +05:30
parent 142c1c003e
commit d5b3df1648

View File

@ -185,7 +185,7 @@ export const SignaturePad = ({
if ($el.current) { if ($el.current) {
const ctx = $el.current.getContext('2d'); const ctx = $el.current.getContext('2d');
const { width, height } = $el.current; const { width, height } = $el.current;
ctx?.clearRect(0, 0, $el.current.width, $el.current.height); ctx?.clearRect(0, 0, width, height);
if (typeof defaultValue === 'string' && defaultImageRef.current) { if (typeof defaultValue === 'string' && defaultImageRef.current) {
ctx?.putImageData(defaultImageRef.current, 0, 0); ctx?.putImageData(defaultImageRef.current, 0, 0);
} }