bug: missing parent

This commit is contained in:
Kieran 2023-05-15 12:02:01 +01:00
parent f63d7a9cc3
commit 21cdab493f
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -16,6 +16,8 @@ export default function DmWindow({ id }: { id: string }) {
const dmListRef = useRef<HTMLDivElement>(null);
function resize(chatList: HTMLDivElement) {
if (!chatList.parentElement) return;
const scrollWrap = unwrap(chatList.parentElement);
const h = scrollWrap.scrollHeight;
const s = scrollWrap.clientHeight + scrollWrap.scrollTop;