lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb in adiwg-mdtranslator-2.17.1 vs lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb in adiwg-mdtranslator-2.18.0rc1

- old
+ new

@@ -41,9 +41,13 @@ hResponseObj[:readerStructureMessages] << err.to_s.slice(0, 300) hResponseObj[:readerStructurePass] = false return {} end + if hMdJson.is_a?(Array) + hMdJson = hMdJson.first + end + # file must contain an mdJson object if hMdJson.empty? hResponseObj[:readerStructureMessages] << 'ERROR: mdJson reader: object is empty' hResponseObj[:readerStructurePass] = false return {}