This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Product Collection - Fix undefined layout attribute issue in migration (
#11196) This commit addresses an issue where layout attributes could become undefined during the block migration process. Alongside this fix, several updates were made to align the migration logic with the new `ProductCollectionDisplayLayout` types: - Added logic to handle `undefined` layout attributes, defaulting to `DEFAULT_ATTRIBUTES.displayLayout`. - Removed `ProductGridLayout` and `ProductGridLayoutTypes` from the types file. - Imported `LayoutOptions` and `ProductCollectionDisplayLayout` from the product-collection module. - Updated the `mapLayoutType` and `mapLayoutPropertiesFrom...` functions to use the new layout types. - Updated transformation functions like `transformProductTemplate` and `transformPostSummary` to use the new types. These changes not only resolve the issue with undefined layout attributes but also align the codebase with the new layout options, enhancing code maintainability.
- Loading branch information
1 parent
6b2121c
commit 6bb21dc
Showing
3 changed files
with
24 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters