lib/doozer/app.rb in doozer-0.4.1 vs lib/doozer/app.rb in doozer-0.4.2
- old
+ new
@@ -109,10 +109,10 @@
else
app = [404, {"Content-Type" => "text/html"}, @@errors[404]]
end
# pass the app through route.middleware_after if defined
- app = route.middleware_after.new(app, {:config=>Doozer::Configs, :route=>route}).call(env) if route.middleware_after
+ app = route.middleware_after.new(app, {:config=>Doozer::Configs, :route=>route}).call(env) if route and route.middleware_after
return app
end
def execution_time(name = nil, point = :start)
\ No newline at end of file