Closed jlblcc closed 6 years ago
I reviewed all 80+ html writer modules and found a few more instances of writes not testing for nil values. Most were required fields such as a keywordObject with no keyword, but set checks around these anyway. The only exception is contactId. contactId is used in creating hyperlinks within the html document thus a nil contactId is going to create problems beyond just a crashing text field.
Just need to check topologyLevel before running
text!
. Problem mainly when translating from FGDC. See: https://github.com/adiwg/mdTranslator/blob/master/lib/adiwg/mdtranslator/writers/html/sections/html_vectorRepresentation.rb#L27Since this seems to be an on-going issue, I'm wondering if we shouldn't extend Builder::XmlMarkup with a
textIf!
method that checks for a null value before callingtext!
?