Skip to content

Commit

Permalink
feat: getting correctly value and provisional use of any type
Browse files Browse the repository at this point in the history
  • Loading branch information
albertjcuac committed Mar 27, 2024
1 parent 6504b4b commit 86a9c52
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
*
* @public
*/
const el = ref<HTMLElement | null>(null);
const el = ref<any>(null);
/**
* Pending identifier scroll position to restore. If it matches the {@link MainScrollItem} item
Expand Down Expand Up @@ -82,12 +82,12 @@
oldObserver: ScrollVisibilityObserver | null
): void => {
{
if (el.value !== null && el.value instanceof HTMLElement) {
oldObserver?.unobserve(el.value);
newObserver?.observe(el.value);
if (el.value !== null) {
oldObserver?.unobserve(el.value.$el);
newObserver?.observe(el.value.$el);
if (pendingScrollTo === props.item.id) {
Vue.nextTick(() => {
el.value?.scrollIntoView({
el.value?.$el.scrollIntoView({
block: 'center'
});
});
Expand Down Expand Up @@ -122,8 +122,8 @@
* @internal
*/
beforeDestroy() {
if (this.el !== null && this.el instanceof HTMLElement) {
this.firstVisibleItemObserver?.unobserve(this.el);
if (this.el !== null) {
this.firstVisibleItemObserver?.unobserve(this.el.$el);
}
}
});
Expand Down

0 comments on commit 86a9c52

Please sign in to comment.