lib/padrino-admin/middleware/flash_middleware.rb in padrino-admin-0.8.1 vs lib/padrino-admin/middleware/flash_middleware.rb in padrino-admin-0.8.2

- old
+ new

@@ -17,10 +17,11 @@ end def call(env) if env['HTTP_USER_AGENT'] =~ /^(Adobe|Shockwave) Flash/ params = ::Rack::Request.new(env).params - env['rack.session'][@session_key.to_sym] = params[@session_key] unless params[@session_key].nil? + env['rack.session'] ||= {} + env['rack.session'][@session_key.to_sym] = params[@session_key] if params[@session_key].present? end @app.call(env) end end end \ No newline at end of file