From a4a62a19fdc2a5700cc5ac8e49eb756236dae717 Mon Sep 17 00:00:00 2001 From: Gonzalo Goral Date: Thu, 26 Dec 2019 11:29:58 -0300 Subject: [PATCH] Update flash.rb --- lib/sinatra/flash.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sinatra/flash.rb b/lib/sinatra/flash.rb index 07b07ff..371d4ca 100644 --- a/lib/sinatra/flash.rb +++ b/lib/sinatra/flash.rb @@ -12,10 +12,10 @@ def self.registered(app) # This callback rotates any flash structure we referenced, placing the 'next' hash into the session # for the next request. - app.after {@flash.each{|key, flash| session[key] = @flash[key].next} if @flash} + app.after {@flash.each{|key, flash| session[key] = @flash[key].next} if defined? @flash} end end register Flash -end \ No newline at end of file +end