refactor: convert CCInfiniteScroll class to Typescript

Change-Id: I4ec59b96a71b1a23a16f3d5dd923e9d8fd3f2638
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);
   }
 }