File tree 3 files changed +13
-4
lines changed
app/code/Magento/Catalog/view/frontend/web/js/product 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ define([
35
35
productCurrentScope ,
36
36
scopeId ;
37
37
38
- if ( typeof this . data . productCurrentScope !== 'undefined' ) {
38
+ if ( typeof this . data . productCurrentScope !== 'undefined' && window . checkout && window . checkout . baseUrl ) {
39
39
productCurrentScope = this . data . productCurrentScope ;
40
40
scopeId = productCurrentScope === 'store' ? window . checkout . storeId :
41
41
productCurrentScope === 'group' ? window . checkout . storeGroupId :
Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ define([
93
93
* @private
94
94
*/
95
95
_resolveDataByIds : function ( ) {
96
+ if ( ! window . checkout || ! window . checkout . baseUrl ) {
97
+ // We need data that the minicart provdes to determine storeId/websiteId
98
+ return ;
99
+ }
100
+
96
101
this . initIdsListener ( ) ;
97
102
this . idsMerger (
98
103
this . idsStorage . get ( ) ,
Original file line number Diff line number Diff line change @@ -30,9 +30,13 @@ define([
30
30
* @returns {Object } Chainable.
31
31
*/
32
32
initialize : function ( ) {
33
- this . _super ( )
34
- . initIdsStorage ( )
35
- . initDataStorage ( ) ;
33
+ this . _super ( ) ;
34
+
35
+ if ( window . checkout && window . checkout . baseUrl ) {
36
+ this . initIdsStorage ( ) ;
37
+ }
38
+
39
+ this . initDataStorage ( ) ;
36
40
37
41
return this ;
38
42
} ,
You can’t perform that action at this time.
0 commit comments