Skip to content

Commit

Permalink
Add check for preference.savePatterns
Browse files Browse the repository at this point in the history
  • Loading branch information
mikachan committed Aug 15, 2024
1 parent 6de813f commit 95c068a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/editor-sidebar/save-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ export const SaveThemePanel = () => {
const searchParams = new URLSearchParams(
window?.location?.search
);
// If user is editing a pattern, redirect back to the patterns page.
// If user is editing a pattern and savePatterns is true, redirect back to the patterns page.
if (
preference.savePatterns &&
searchParams.get( 'postType' ) === 'wp_block' &&
searchParams.get( 'postId' )
) {
Expand Down

0 comments on commit 95c068a

Please sign in to comment.