Skip to content

Commit

Permalink
Move batch call inside braces
Browse files Browse the repository at this point in the history
  • Loading branch information
DAreRodz committed Feb 22, 2024
1 parent ece2467 commit ffa8db8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/interactivity-router/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const regionsToVdom = ( dom, { vdom } = {} ) => {
};

// Render all interactive regions contained in the given page.
const renderRegions = ( page ) =>
const renderRegions = ( page ) => {
batch( () => {
populateInitialData( page.initialData );
const attrName = `data-${ directivePrefix }-router-region`;
Expand All @@ -71,6 +71,7 @@ const renderRegions = ( page ) =>
document.title = page.title;
}
} );
};

/**
* Load the given page forcing a full page reload.
Expand Down

0 comments on commit ffa8db8

Please sign in to comment.