lib/adiwg/mdtranslator/writers/html/sections/html_allocation.rb in adiwg-mdtranslator-2.3.0 vs lib/adiwg/mdtranslator/writers/html/sections/html_allocation.rb in adiwg-mdtranslator-2.3.1

- old
+ new

@@ -46,18 +46,26 @@ # allocation - sourceId unless hAllocation[:sourceId].nil? hContact = Html_Document.getContact(hAllocation[:sourceId]) @html.em('Source Contact: ') - @html.a(hContact[:contactId], 'href' => '#CID_'+hContact[:contactId]) + if hContact.empty? + @html.text!("Contact #{hAllocation[:sourceId]} not found!") + else + @html.a(hContact[:contactId], 'href' => '#CID_'+hContact[:contactId]) + end @html.br end # allocation - recipientId unless hAllocation[:recipientId].nil? hContact = Html_Document.getContact(hAllocation[:recipientId]) @html.em('Recipient Contact: ') - @html.a(hContact[:contactId], 'href' => '#CID_'+hContact[:contactId]) + if hContact.empty? + @html.text!("Contact #{hAllocation[:recipientId]} not found!") + else + @html.a(hContact[:contactId], 'href' => '#CID_'+hContact[:contactId]) + end @html.br end # allocation - matching {Boolean} unless hAllocation[:matching].nil?