Skip to content

Commit 6e60331

Browse files
committed
Changes to warning instead of error for scrollhelper
1 parent 0eb301d commit 6e60331

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scrollHelper.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ export function scrollElementIntoView(elementId: string, timeout?: number) {
9696
}
9797

9898
const element = document.getElementById(elementId);
99-
if (!element) {
100-
throw new Error("scrollElementIntoView elementId not found");
101-
}
99+
if (!element) console.warn("scrollElementIntoView elementId not found");
102100
element.scrollIntoView({ behavior: "smooth", block: "start" });
103101
}

0 commit comments

Comments
 (0)