lib/grape/error_formatter/base.rb in grape-1.7.1 vs lib/grape/error_formatter/base.rb in grape-1.8.0
- old
+ new
@@ -25,10 +25,10 @@
presenter = found_code[2] if found_code
end
if presenter
embeds = { env: env }
- embeds[:version] = env[Grape::Env::API_VERSION] if env[Grape::Env::API_VERSION]
+ embeds[:version] = env[Grape::Env::API_VERSION] if env.key?(Grape::Env::API_VERSION)
presented_message = presenter.represent(presented_message, embeds).serializable_hash
end
presented_message
end