This code is from the entry point file of the custom extension
if (pdp) {
pdp.on('beforeShowContent', function () {
let itemInfo = pdp.getItemInfo();
if (itemInfo.item.matrixchilditems_detail) {
layout.addToViewContextDefinition('ProductViews.Option.View', 'matrixImages', 'array', function (context) {
//Some Logic here
return arrToReturn;
});
}
});
}
I am getting this error in the console while redering to PDP from PLP and page is not redirecting.
"Exception on event handler for event beforeShowContent DUPLICATED_CONTEXT_PROPERTY: Duplicated propertyName. Trying to add more than one extra context property with the same name"
Any help would be appreciated