Skip to content

Commit

Permalink
Merge pull request #51 from bichinger/fix-css-load
Browse files Browse the repository at this point in the history
Fix css load when using manifest_name
  • Loading branch information
michael-misshore authored Apr 29, 2020
2 parents 09f172b + 52e8e5c commit 0dfd5b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/critical_path_css/rails/config_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ def configuration_file_path
def format_css_paths
config['css_paths'] = [config['css_path']] if config['css_path']

if config['css_paths']
config['css_paths'].map! { |path| format_path(path) }
else
unless config['css_paths']
config['css_paths'] = [ActionController::Base.helpers.stylesheet_path(config['manifest_name'], host: '')]
end
config['css_paths'].map! { |path| format_path(path) }
end

def format_path(path)
Expand Down

0 comments on commit 0dfd5b8

Please sign in to comment.