File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed
app/code/Magento/Catalog/view/frontend/web/js/product/storage Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ define([
118
118
if ( _ . isEmpty ( data ) ) {
119
119
this . localStorage . removeAll ( ) ;
120
120
} else {
121
- this . localStorage . set ( data ) ;
121
+ window . localStorage . setItem ( this . namespace , JSON . stringify ( data ) ) ;
122
122
}
123
123
} ,
124
124
Original file line number Diff line number Diff line change @@ -94,11 +94,7 @@ define([
94
94
* Initializes handler to "data" property update
95
95
*/
96
96
internalDataHandler : function ( data ) {
97
- var localStorage = this . localStorage . get ( ) ;
98
-
99
- if ( ! utils . compare ( data , localStorage ) . equal ) {
100
- this . localStorage . set ( data ) ;
101
- }
97
+ window . localStorage . setItem ( this . namespace , JSON . stringify ( data ) ) ;
102
98
} ,
103
99
104
100
/**
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ define([
47
47
* @param {* } data
48
48
*/
49
49
add : function ( data ) {
50
- if ( ! _ . isEmpty ( data ) && ! utils . compare ( data , this . data ( ) ) . equal ) {
50
+ if ( ! _ . isEmpty ( data ) ) {
51
51
this . data ( _ . extend ( utils . copy ( this . data ( ) ) , data ) ) ;
52
52
}
53
53
} ,
You can’t perform that action at this time.
0 commit comments