Skip to content

Commit

Permalink
The dimension param can be blank
Browse files Browse the repository at this point in the history
```
Error: Parameter 'dimension': Expected type String, got type NilClass
Caller: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/cmd/formula-analytics.rb:248
Definition: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-formula-analytics/cmd/formula-analytics.rb:375
```
  • Loading branch information
issyl0 committed Jan 9, 2025
1 parent 86bee01 commit 6dec056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/formula-analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def format_percent(percent)
format("%<percent>.2f", percent:).gsub(/\.00$/, "")
end

sig { params(dimension: String).returns(T.nilable(String)) }
sig { params(dimension: T.nilable(String)).returns(T.nilable(String)) }
def format_os_version_dimension(dimension)
return if dimension.blank?

Expand Down

0 comments on commit 6dec056

Please sign in to comment.