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);
|
||||
|
||||
function resize(chatList: HTMLDivElement) {
|
||||
if (!chatList.parentElement) return;
|
||||
|
||||
const scrollWrap = unwrap(chatList.parentElement);
|
||||
const h = scrollWrap.scrollHeight;
|
||||
const s = scrollWrap.clientHeight + scrollWrap.scrollTop;
|
||||
|
Loading…
x
Reference in New Issue
Block a user