I am getting following error but not sure how to debug. Please guide.
Warning: foreach() argument must be of type array|object, null given in app/code/XYZ/ElasticSmile/Model/Product/Indexer/Fulltext/Datasource/CatalogExtra.php on line 494
Here the function is
foreach ($product->getExtensionAttributes()->getConfigurableProductOptions() as $option) {
$attributeCode = $option['product_attribute']->getAttributeCode();
$options[$attributeCode] = $child->getData($attributeCode);
//If you want to display swatch image, along with the option value, Do it here
}