Skip to content

Commit

Permalink
Merge pull request #3891 from dbolack-ab/Issue_3718
Browse files Browse the repository at this point in the history
Fix Issue 3718 by bounds checking prerender.
  • Loading branch information
calculuschild authored Nov 12, 2024
2 parents ccc37fc + 4e4463f commit e006826
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/homebrew/brewRenderer/brewRenderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ const BrewRenderer = (props)=>{
renderedPages.length = 0;

// Render currently-edited page first so cross-page effects (variables, links) can propagate out first
renderedPages[props.currentEditorCursorPageNum - 1] = renderPage(rawPages[props.currentEditorCursorPageNum - 1], props.currentEditorCursorPageNum - 1);
if(rawPages.length > props.currentEditorCursorPageNum -1)
renderedPages[props.currentEditorCursorPageNum - 1] = renderPage(rawPages[props.currentEditorCursorPageNum - 1], props.currentEditorCursorPageNum - 1);

_.forEach(rawPages, (page, index)=>{
if((isInView(index) || !renderedPages[index]) && typeof window !== 'undefined'){
Expand Down

0 comments on commit e006826

Please sign in to comment.