Skip to content

Commit

Permalink
fix NoMethodError
Browse files Browse the repository at this point in the history
undefined method `upcase' for nil:NilClass
  • Loading branch information
baraidrissa authored Aug 31, 2023
1 parent 116cfd7 commit bb5f1d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/itax_code/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Parser
InvalidTaxCodeError = Class.new(Error)

def initialize(tax_code, utils = Utils.new)
@tax_code = tax_code.upcase
@tax_code = tax_code.to_s.upcase
raise NoTaxCodeError if @tax_code.blank?
raise InvalidTaxCodeError unless Validator.standard_length?(@tax_code)

Expand Down

0 comments on commit bb5f1d6

Please sign in to comment.