fix (client): invalid non-null assertion

This commit is contained in:
naskya 2024-05-22 04:43:49 +09:00
parent 521cfe7fe3
commit 4af3ca86a6
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -28,7 +28,7 @@ const parentStickyTop = inject<Ref<number>>(CURRENT_STICKY_TOP, ref(0));
provide(CURRENT_STICKY_TOP, childStickyTop);
const calc = () => {
childStickyTop.value = parentStickyTop.value + headerEl.value!.offsetHeight;
childStickyTop.value = parentStickyTop.value + (headerEl.value?.offsetHeight ?? 0);
headerHeight.value = headerEl.value!.offsetHeight.toString();
};