forked from Kieran/snort
bug: missing parent
This commit is contained in:
parent
f63d7a9cc3
commit
21cdab493f
@ -16,6 +16,8 @@ export default function DmWindow({ id }: { id: string }) {
|
|||||||
const dmListRef = useRef<HTMLDivElement>(null);
|
const dmListRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
function resize(chatList: HTMLDivElement) {
|
function resize(chatList: HTMLDivElement) {
|
||||||
|
if (!chatList.parentElement) return;
|
||||||
|
|
||||||
const scrollWrap = unwrap(chatList.parentElement);
|
const scrollWrap = unwrap(chatList.parentElement);
|
||||||
const h = scrollWrap.scrollHeight;
|
const h = scrollWrap.scrollHeight;
|
||||||
const s = scrollWrap.clientHeight + scrollWrap.scrollTop;
|
const s = scrollWrap.clientHeight + scrollWrap.scrollTop;
|
||||||
|
Loading…
Reference in New Issue
Block a user