[#2258] Make linked menus more robust in the face of bad configuration
This commit is contained in:
parent
9c65b65a03
commit
695426316c
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ class TypesDeChamp::LinkedDropDownListTypeDeChamp < TypesDeChamp::TypeDeChampBas
|
|||
chunked.map do |chunk|
|
||||
primary, *secondary = chunk
|
||||
secondary.unshift('')
|
||||
[PRIMARY_PATTERN.match(primary)[1], secondary]
|
||||
[PRIMARY_PATTERN.match(primary)&.[](1), secondary]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue