mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 08:56:52 +00:00
refactor: simplify logical expressions and update biome linting rules
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user