Skip to content

Commit f7c5089

Browse files
Merge pull request #54 from shinnyx/bugfix/invalid-route
Return first css path when route index is nil
2 parents 847a74b + 5ceff9d commit f7c5089

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/critical_path_css/configuration.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def penthouse_options
2626
end
2727

2828
def path_for_route(route)
29-
css_paths[routes.index(route)] || css_paths.first
29+
css_paths[routes.index(route).to_i]
3030
end
3131
end
3232
end

0 commit comments

Comments
 (0)