refactor: simplify logical expressions and update biome linting rules

This commit is contained in:
ramvignesh-b
2026-04-14 00:16:25 +05:30
parent 1f94df1309
commit 5c81d617bd
4 changed files with 10 additions and 6 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ export const ComposeCanvas = forwardRef<
};
const finalWidth = await waitForLayout();
if (!isMounted || !canvasRef.current || !wrapperRef.current) return;
if (!(isMounted && canvasRef.current && wrapperRef.current)) return;
const initialHeight = Math.max(
wrapperRef.current.clientHeight || 900,
@@ -101,7 +101,7 @@ export const ComposeCanvas = forwardRef<
canvas.add(textbox);
textbox.on("changed", () => {
if (!canvas || !wrapperRef.current) return;
if (!(canvas && wrapperRef.current)) return;
const neededHeight = textbox.top + textbox.height + PAD;
if (neededHeight > canvas.height) {
const newH = neededHeight + PAD;