Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- add ssrAppId to avoid second meta render on csr - @gibkigonzo (#4203)
- take control over default broswer behavior and use saved category page size to load prev products - @gibkigonzo (#4201)
- update getCurrentCartHash after add/remove coupon - @gibkigonzo (#4220)
- update replaceNumberToString, so it will change ONLY numbers to string - @gibkigonzo (#4217)

## [1.11.2] - 2020.03.10

Expand Down
5 changes: 3 additions & 2 deletions core/modules/cart/helpers/productChecksum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import cloneDeep from 'lodash-es/cloneDeep';

const replaceNumberToString = obj => {
Object.keys(obj).forEach(key => {
if (typeof obj[key] === 'object') {
if (obj[key] !== null && typeof obj[key] === 'object') {
return replaceNumberToString(obj[key]);
} else if (typeof obj[key] === 'number') {
obj[key] = String(obj[key]);
}
obj[key] = String(obj[key]);
});
return obj;
}
Expand Down