Hi Guys,
Good Morning!
I have encountered a piece of code on the SuiteCommerceAdvance website.
Here is the code: -
getData: function(){
debugger;
var self = this;
console.log('typeof DomainMap-621',typeof DomainMap);
if(typeof DomainMap == 'undefined' && this.data.isConfigurator == true){
console.log('cdn files not loaded-600');
setTimeout(function(){
self.render();
},700);
}else{
console.log('cdn files loaded-605');
console.log("this.data-606",this.data);
return this.data;
}
},
In one of our SCA projects, we are encountering an issue with the DomainMap value in the logs for a new domain built on SCA version 23.1. We have used same Website Setup record, Configuration record in to this domain from the currenlty live domain which is build using 18.2 verison of SCA. However, the new domain shows DomainMap as undefined, causing the code to enter the if block and preventing the required files from loading.
In contrast, the live domain built on SCA version 18.2, which the business currently operates on, logs the DomainMap value . This satisfies the if condition, allowing the code to go to the else block.
Can you guys please explain me what is the use of typeof DomainMap in the the context of SCA.
Best regards,
Shubham Singh.