Skip to content

Commit

Permalink
Merge pull request #143 from Shopify/fix-redirect-snippet
Browse files Browse the repository at this point in the history
Fix redirects for snippets
  • Loading branch information
mgmanzella authored Jun 6, 2024
2 parents 542ab96 + ee5f504 commit c3076ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/utils/getProfileData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ function formatLiquidProfileData(
} else if (nameParts[0] === 'sections') {
name = `section:${nameParts[1].replace(/\.liquid$/, '')}`;
filepath = entry.partial;
} else if (nameParts[0] === 'snippets') {
name = `snippet:${nameParts[1]}`;
filepath = `${entry.partial}.liquid`;
} else {
name = entry.partial;
const partialParts = entry.partial.split(':');
Expand Down
3 changes: 2 additions & 1 deletion src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const IS_CHROME = navigator.userAgent.indexOf('Firefox') < 0;
export function isDev(origin: string): boolean {
return (
origin.includes('shop1.myshopify') ||
origin.includes('shop1-fast.myshopify')
origin.includes('shop1-fast.myshopify') ||
origin.includes('us.spin.dev')
);
}

Expand Down

0 comments on commit c3076ab

Please sign in to comment.