Skip to content

Commit 7f982fe

Browse files
authored
Merge branch 'hotfix/v1.12.3' of https://github.com/vuestorefront/vue-storefront into hotfix/v1.12.3
2 parents 72106cd + bd24d6c commit 7f982fe

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3939
- servercart-after-diff event payload - Fifciu (#5365)
4040
- Fix Original Price Calculation typo - @akucharczyk / @lukaszjedrasik (#5472)
4141
- Purge loader works properly with dynamic config reload - @Fifciu
42+
- Multi-tab cart-sync in multi-store environment - @cewald (#5711, #5732)
43+
- Incorrect load of default address in checkout - @lukaszjedrasik ([#4682](https://github.com/vuestorefront/vue-storefront/issues/4682))
44+
4245
### Changed / Improved
4346

4447
- Moved hardcoded fields from omitSelectedVariantFields.ts to config (#4679)
4548
- Bump dependencies versions (#4715, #4696, #4951)
4649
- Using dayjs for dates in taxCalc.ts to make it work properly in Safari (#5364)
4750
- Awaiting addItem action call inside mergeServerItem action (#5165)
51+
- Moved `phoneNum` to proper branch - @lukaszjedrasik ([#5730](https://github.com/vuestorefront/vue-storefront/issues/5730))
52+
4853
## [1.12.2] - 2020.07.28
4954

5055
### Added

core/helpers/validators/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@ export const unicodeAlpha = (value: string): boolean => /[A-Za-z\xAA\xB5\xBA\xC0
33

44
/** check if string contains some any unicode alphabet characters or digits */
55
export const unicodeAlphaNum = (value: string): boolean => unicodeAlpha(value) || /[0-9]+/.test(value)
6-
7-
/** check if string contains between 6 and 14 digits and can consist of plus sign with national code and spaces between groups of digits */
8-
export const phoneNum = (value: string): boolean => /^\+?(?:[0-9] ?){6,14}[0-9]$/.test(value)

core/modules/cart/helpers/syncCartWhenLocalStorageChange.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
import rootStore from '@vue-storefront/core/store';
1+
import rootStore from '@vue-storefront/core/store'
2+
import { storeViews } from 'config'
3+
import { currentStoreView } from '@vue-storefront/core/lib/multistore'
4+
5+
function checkMultistoreKey (key: string, path: string): boolean {
6+
const { multistore, commonCache } = storeViews
7+
if (!multistore || (multistore && commonCache)) return key === path
8+
return key === `${currentStoreView().storeCode}-${path}`
9+
}
210

311
function getItemsFromStorage ({ key }) {
4-
const value = JSON.parse(localStorage[key])
5-
if (key === 'shop/cart/current-cart') {
12+
if (checkMultistoreKey(key, 'shop/cart/current-cart')) {
13+
const value = JSON.parse(localStorage[key])
614
rootStore.dispatch('cart/updateCart', { items: value })
7-
} else if (key === 'shop/cart/current-totals') {
15+
} else if (checkMultistoreKey(key, 'shop/cart/current-totals')) {
16+
const value = JSON.parse(localStorage[key])
817
rootStore.dispatch('cart/updateTotals', value)
918
}
1019
}

core/modules/checkout/components/Shipping.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ export const Shipping = {
6262
shipToMyAddress: {
6363
handler () {
6464
this.useMyAddress()
65-
},
66-
immediate: true
67-
}
65+
}
66+
},
67+
'$route.hash': 'useMyAddress'
6868
},
6969
mounted () {
7070
this.checkDefaultShippingAddress()

src/themes/default

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)