Skip to content

Commit

Permalink
fix Mime::NullType issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zvkemp committed Jun 24, 2020
1 parent a938cd0 commit 12c2858
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,6 @@
## 4.3.1 (June 24, 2020)
* [BUGFIX] Fix an issue in which `Mime::NullType` would result in an exception

## 4.3.0 (March 18, 2020)
* [IMPROVEMENT] Fix Ruby 2.7 warnings
* [IMPROVEMENT] Update Grape normalizer for version 1.3.1
Expand Down
2 changes: 1 addition & 1 deletion SKYLIGHT_VERSION
@@ -1 +1 @@
4.3.0
4.3.1
2 changes: 1 addition & 1 deletion lib/skylight/version.rb
@@ -1,3 +1,3 @@
module Skylight
VERSION = "4.3.0".freeze
VERSION = "4.3.1".freeze
end
7 changes: 7 additions & 0 deletions skylight-core/lib/skylight/core/probes/action_controller.rb
Expand Up @@ -27,6 +27,13 @@ def sk_rendered_mime
elsif respond_to?(:rendered_format) && rendered_format
rendered_format
end
rescue
# There are cases in which actionpack can return
# a stringified representation of a Mime::NullType instance,
# which is invalid for a number of reasons. This string raises
# errors when piped through Mime::Type.lookup, so it's probably
# best to just return nil in those cases.
nil
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion skylight-core/lib/skylight/core/version.rb
@@ -1,5 +1,5 @@
module Skylight
module Core
VERSION = "4.3.0".freeze
VERSION = "4.3.1".freeze
end
end

0 comments on commit 12c2858

Please sign in to comment.