lib/rixml.rb in rixml-0.4.7 vs lib/rixml.rb in rixml-0.4.8
- old
+ new
@@ -158,10 +158,12 @@
end
companies.flatten
end
def parse_product_category_from_context(context)
- context.dig('ProductDetails', 'ProductCategory', 'productCategory')
+ product_category = context.dig('ProductDetails', 'ProductCategory')
+ return product_category['productCategory'] if product_category.is_a?(Hash)
+ product_category
end
def parse_publication_date_from_context(context)
context.dig('ProductDetails', 'publicationDateTime')
end