Skip to content

Commit

Permalink
Guard against null query
Browse files Browse the repository at this point in the history
  • Loading branch information
mgurgel committed Jan 10, 2025
1 parent 36dc702 commit d929837
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shared/js/browser/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export const getContentHeight = () => {
window.document.querySelector('#popup-container.sliding-subview-v2--root [data-current]:last-of-type > *:first-child')
);

if (!$openSubviewV2) {
return null;
}

const { scrollHeight, dataset } = $openSubviewV2;
const maxViewHeight = Number(dataset?.maxViewHeight);

Expand Down

0 comments on commit d929837

Please sign in to comment.