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 Dec 16, 2023
1 parent 71203c3 commit 7ca0847
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/interactivity/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const prefetch = ( url, options = {} ) => {
};

// Render all interactive regions contained in the given page.
const renderRegions = ( page ) =>
const renderRegions = ( page ) => {
batch( () => {
Object.entries( page.state ).forEach( ( [ ns, state ] ) => {
deepMerge( stores.get( ns ).state, state );
Expand All @@ -97,6 +97,7 @@ const renderRegions = ( page ) =>
document.title = page.title;
}
} );
};

// Variable to store the current navigation.
let navigatingTo = '';
Expand Down

0 comments on commit 7ca0847

Please sign in to comment.