Skip to content

Commit

Permalink
Fix redirects for snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmanzella committed Jun 5, 2024
1 parent d2cf433 commit ee5f504
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 ee5f504

Please sign in to comment.