Skip to content

Commit

Permalink
Merge pull request #366 from dav-armour/headless-fix
Browse files Browse the repository at this point in the history
Fix loading of frontend decorators if frontend not available
  • Loading branch information
damianlegawiec authored Nov 9, 2020
2 parents 96aa2f7 + dd57029 commit ea8564f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/spree_gateway/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ def self.activate
Rails.application.config.cache_classes ? require(c) : load(c)
end

Dir.glob(File.join(File.dirname(__FILE__), '../../lib/spree_frontend/controllers/spree/*_decorator*.rb')) do |c|
Rails.application.config.cache_classes ? require(c) : load(c)
if self.frontend_available?
Dir.glob(File.join(File.dirname(__FILE__), '../../lib/spree_frontend/controllers/spree/*_decorator*.rb')) do |c|
Rails.application.config.cache_classes ? require(c) : load(c)
end
end
end

Expand Down

0 comments on commit ea8564f

Please sign in to comment.