fix(draggable-window): pass null to useRef<HTMLDivElement> for TS6

Upstream V3.5.0 introduced a useRef<HTMLDivElement>() call with no
initial value. TS6 (and the tsgo preview compiler) now require an
explicit initial value for useRef typed against a DOM element. Pass
null to match the React 19 RefObject<HTMLDivElement | null> shape.
This commit is contained in:
simoleo89
2026-05-20 20:30:51 +02:00
committed by simoleo89
parent a08c002c53
commit f4d17ece16
@@ -30,7 +30,7 @@ export const DraggableWindow: FC<DraggableWindowProps> = props =>
const [isDragging, setIsDragging] = useState(false);
const [isPositioned, setIsPositioned] = useState(false);
const [dragHandler, setDragHandler] = useState<HTMLElement>(null);
const elementRef = useRef<HTMLDivElement>();
const elementRef = useRef<HTMLDivElement>(null);
const bringToTop = useCallback(() => {
let zIndex = 400;
for (const existingWindow of CURRENT_WINDOWS)