Skip to content

Commit

Permalink
move default value before conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-blanco committed Jul 22, 2022
1 parent 65dc55a commit bbcde16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/state/themes/actions/activate.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export function activate(
return dispatch( showAutoLoadingHomepageWarning( themeId ) );
}

keepCurrentHomepage = isSiteAtomic( getState(), siteId ) ? true : keepCurrentHomepage;

if ( isJetpackSite( getState(), siteId ) && ! getTheme( getState(), siteId, themeId ) ) {
const installId = suffixThemeIdForInstall( getState(), siteId, themeId );
// If theme is already installed, installation will silently fail,
Expand All @@ -54,8 +56,6 @@ export function activate(
);
}

keepCurrentHomepage = isSiteAtomic( getState(), siteId ) ? true : keepCurrentHomepage;

return dispatch( activateTheme( themeId, siteId, source, purchased, keepCurrentHomepage ) );
};
}

0 comments on commit bbcde16

Please sign in to comment.