Skip to content

Commit 1b33f92

Browse files
committed
Protection against NilException
1 parent 7ee2069 commit 1b33f92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/junethack/models/game.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,12 +426,12 @@ def ascended_with_all_invocation_items?
426426
end
427427

428428
def ascended_without_elbereth?
429-
return true if ascended && conductX&.split(",").include?("elberethless")
429+
return true if ascended && conductX&.split(",")&.include?("elberethless")
430430
(ascended && (Integer(conduct) & 0x01000 > 0)) || (ascended && elbereths == 0)
431431
end
432432

433433
def ascended_without_unfairly_scaring_monsters?
434-
ascended && (conductX&.split(",").include?("unfairscareless"))
434+
ascended && (conductX&.split(",")&.include?("unfairscareless"))
435435
end
436436

437437
# Heaven or Hell

0 commit comments

Comments
 (0)