Skip to content

Commit b851dad

Browse files
committed
Don't use computedStyleMap
1 parent d61db35 commit b851dad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/gitbook/src/components/TableOfContents/TableOfContentsScript.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function TableOfContentsScript() {
2424
let height = window.innerHeight - headerHeight;
2525

2626
// Subtract visible banner (if any)
27-
if (banner && banner?.computedStyleMap().get('display') !== 'none') {
27+
if (banner && window.getComputedStyle(banner).display !== 'none') {
2828
const bannerRect = banner.getBoundingClientRect();
2929
if (bannerRect.height > 0 && bannerRect.bottom > 0) {
3030
height -= Math.min(bannerRect.height, bannerRect.bottom);

0 commit comments

Comments
 (0)