Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/snap-preact/src/Templates/SnapTemplates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ export function createSnapConfig(templateConfig: SnapTemplatesConfig, templatesS
components: createRecommendationComponentMapping(templateConfig, templatesStore),
config: {
plugins: createPlugins(templateConfig, templatesStore, 'recommendation'),
settings: {
variants: templateConfig.recommendation?.settings?.variants,
},
...templateConfig.recommendation?.settings!,
Comment on lines +491 to 493
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explicit variants assignment (lines 490-492) is immediately overwritten by the spread of templateConfig.recommendation?.settings! on line 493. This makes the explicit assignment redundant and ineffective. If the intention is to ensure variants is included, remove the explicit assignment since the spread already includes it. If the intention is to set a default or transform the value, move the spread before the explicit assignment.

Suggested change
variants: templateConfig.recommendation?.settings?.variants,
},
...templateConfig.recommendation?.settings!,
...templateConfig.recommendation?.settings!,
variants: templateConfig.recommendation?.settings?.variants,
},

Copilot uses AI. Check for mistakes.
},
};
Expand Down
Loading