Skip to content

Commit

Permalink
bugfix: NilClass Opts.char when none passed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhoribu authored Dec 10, 2024
1 parent 3c00a96 commit 9b15a05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions profanity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def self.log_file

@title = nil
@status = nil
@char = Opts.char.capitalize
@char = Opts.char.nil? ? "Unknown" : Opts.char.capitalize
@state = {}

def self.fetch(key, default = nil)
Expand Down Expand Up @@ -179,7 +179,7 @@ def add_prompt(window, prompt_text, cmd = "")
ERROR
end

Profanity.set_terminal_title(Opts.char.capitalize)
Profanity.set_terminal_title((Opts.char.nil? ? "Unknown" : Opts.char.capitalize))

unless defined?(CUSTOM_COLORS)
CUSTOM_COLORS = Curses.can_change_color?
Expand Down

0 comments on commit 9b15a05

Please sign in to comment.