Skip to content

Commit

Permalink
Merge pull request #89 from indirect/nil-ref-guard
Browse files Browse the repository at this point in the history
guard against nil key and @referenced
  • Loading branch information
kaspth authored Dec 10, 2024
2 parents 24d188a + e41c626 commit 0951b63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generators/oaken/convert/fixtures_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def recursive_convert(input, key: nil)
when Array then input.map { recursive_convert _1 }.join(", ")
when Integer then input
else
if key == @referenced&.first
if key && key == @referenced&.first
@referenced.last == :plural ? "[#{input}]" : input
else
"\"#{input}\""
Expand Down

0 comments on commit 0951b63

Please sign in to comment.