Skip to content

Commit

Permalink
bugfix: The routes gem will exist if there's no site present
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite committed May 26, 2022
1 parent c6b9c03 commit be52d48
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bridgetown-routes/lib/bridgetown-routes/roda_router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
module Bridgetown
module Routes
module RodaRouter
def self.start!(app)
def self.start!(app) # rubocop:todo Metrics/MethodLength
unless Bridgetown::Current.site
Bridgetown.logger.warn(
"The `bridgetown_routes` plugin hasn't been configured in the Roda app."
)
return
end

r = app.request
response = app.response

Expand Down

0 comments on commit be52d48

Please sign in to comment.