refactor: convert CCInfiniteScroll class to Typescript

Change-Id: I4ec59b96a71b1a23a16f3d5dd923e9d8fd3f2638
diff --git a/src/features/infiniteScroll/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBar.handler.ts b/src/features/infiniteScroll/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBar.handler.ts
index da4f5e6..e9f04ff 100644
--- a/src/features/infiniteScroll/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBar.handler.ts
+++ b/src/features/infiniteScroll/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBar.handler.ts
@@ -6,6 +6,13 @@
   cssSelector = '.load-more-bar';
 
   onMutatedNode({ node }: NodeMutation) {
+    if (!(node instanceof Element)) {
+      console.error(
+        '[CCInfiniteScrollLoadMoreBarHandler] Node is not an Element: ',
+        node,
+      );
+      return;
+    }
     this.options.ccInfiniteScroll.observeLoadMoreBar(node);
   }
 }
diff --git a/src/features/infiniteScroll/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBtn.handler.ts b/src/features/infiniteScroll/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBtn.handler.ts
index ee54aff..8bf6fd2 100644
--- a/src/features/infiniteScroll/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBtn.handler.ts
+++ b/src/features/infiniteScroll/nodeWatcherHandlers/ccInfiniteScrollLoadMoreBtn.handler.ts
@@ -7,6 +7,13 @@
     '.scTailwindThreadMorebuttonbutton, .scTailwindThreadMessagegapbutton';
 
   onMutatedNode({ node }: NodeMutation) {
+    if (!(node instanceof Element)) {
+      console.error(
+        '[CCInfiniteScrollLoadMoreBtnHandler] Node is not an Element: ',
+        node,
+      );
+      return;
+    }
     this.options.ccInfiniteScroll.observeLoadMoreInteropBtn(node);
   }
 }