File tree Expand file tree Collapse file tree 5 files changed +21
-11
lines changed Expand file tree Collapse file tree 5 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
39
39
- servercart-after-diff event payload - Fifciu (#5365 )
40
40
- Fix Original Price Calculation typo - @akucharczyk / @lukaszjedrasik (#5472 )
41
41
- 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
+
42
45
### Changed / Improved
43
46
44
47
- Moved hardcoded fields from omitSelectedVariantFields.ts to config (#4679 )
45
48
- Bump dependencies versions (#4715 , #4696 , #4951 )
46
49
- Using dayjs for dates in taxCalc.ts to make it work properly in Safari (#5364 )
47
50
- 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
+
48
53
## [ 1.12.2] - 2020.07.28
49
54
50
55
### Added
Original file line number Diff line number Diff line change @@ -3,6 +3,3 @@ export const unicodeAlpha = (value: string): boolean => /[A-Za-z\xAA\xB5\xBA\xC0
3
3
4
4
/** check if string contains some any unicode alphabet characters or digits */
5
5
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 )
Original file line number Diff line number Diff line change 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
+ }
2
10
3
11
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 ] )
6
14
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 ] )
8
17
rootStore . dispatch ( 'cart/updateTotals' , value )
9
18
}
10
19
}
Original file line number Diff line number Diff line change @@ -62,9 +62,9 @@ export const Shipping = {
62
62
shipToMyAddress : {
63
63
handler ( ) {
64
64
this . useMyAddress ( )
65
- } ,
66
- immediate : true
67
- }
65
+ }
66
+ } ,
67
+ '$route.hash' : 'useMyAddress'
68
68
} ,
69
69
mounted ( ) {
70
70
this . checkDefaultShippingAddress ( )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments