File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
app/code/Magento/Catalog/view/frontend/web/js/product Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ define([
3535 productCurrentScope ,
3636 scopeId ;
3737
38- if ( typeof this . data . productCurrentScope !== 'undefined' ) {
38+ if ( typeof this . data . productCurrentScope !== 'undefined' && window . checkout && window . checkout . baseUrl ) {
3939 productCurrentScope = this . data . productCurrentScope ;
4040 scopeId = productCurrentScope === 'store' ? window . checkout . storeId :
4141 productCurrentScope === 'group' ? window . checkout . storeGroupId :
Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ define([
9393 * @private
9494 */
9595 _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+
96101 this . initIdsListener ( ) ;
97102 this . idsMerger (
98103 this . idsStorage . get ( ) ,
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ define([
2828 this . data = ko . observable ( { } ) ;
2929 }
3030
31- if ( this . provider ) {
31+ if ( this . provider && window . checkout && window . checkout . baseUrl ) {
3232 this . providerDataHandler ( customerData . get ( this . provider ) ( ) ) ;
3333 this . initProviderListener ( ) ;
3434 }
Original file line number Diff line number Diff line change @@ -30,9 +30,13 @@ define([
3030 * @returns {Object } Chainable.
3131 */
3232 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 ( ) ;
3640
3741 return this ;
3842 } ,
You can’t perform that action at this time.
0 commit comments