Skip to content

Commit 94eb6d0

Browse files
committed
Refactor
1 parent ecabedb commit 94eb6d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/useQRCode.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ function useCanvasComponent() {
101101
};
102102
} else if (!logo?.options?.x || !logo?.options?.y) {
103103
let margin = options?.margin;
104-
margin = !margin ? (margin === 0 ? 0 : 32) : (margin * 8);
105-
const width = options?.width || (116 + margin);
104+
margin = !margin ? (margin === 0 ? 0 : 32) : margin * 8;
105+
const width = options?.width || 116 + margin;
106106
const center = (width - logoWidth) / 2;
107107
img.onload = function () {
108108
ctx.drawImage(img, center, center, logoWidth, logoWidth);

0 commit comments

Comments
 (0)