Skip to content

Commit

Permalink
Prevent NPE when no subfields
Browse files Browse the repository at this point in the history
  • Loading branch information
kwahlin committed Nov 11, 2024
1 parent f2db8d1 commit eb8c32b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ class RomanizationStep extends MarcFramePostProcStepBase {
def fieldNumber = it.keySet()[0]
def field = it[fieldNumber]
if (field instanceof Map) {
def sf6 = field[SUBFIELDS].find { it.containsKey('6') }
def sf6 = field[SUBFIELDS]?.find { it.containsKey('6') }
if (sf6 && field[SUBFIELDS].any { Map sf -> sf.values().any { it.startsWith(OG_MARK) } }) {
field[SUBFIELDS] = (field[SUBFIELDS] - sf6).collect {
def subfield = it.keySet()[0]
Expand Down

0 comments on commit eb8c32b

Please sign in to comment.