File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -98,13 +98,15 @@ class Railtie < ::Rails::Railtie
9898 end
9999
100100 initializer "react_rails.setup_engine" , :group => :all do |app |
101- if app . config . react . sprockets_strategy == false
102- # pass, sprockets opt-out
103- else
104- # Sprockets 3.x expects this in a different place
105- sprockets_env = app . assets || defined? ( Sprockets ) && Sprockets
101+ # Sprockets 3.x expects this in a different place
102+ sprockets_env = app . assets || defined? ( Sprockets ) && Sprockets
106103
104+ if app . config . react . sprockets_strategy == false
105+ # pass, Sprockets opt-out
106+ elsif sprockets_env . present?
107107 React ::JSX ::SprocketsStrategy . attach_with_strategy ( sprockets_env , app . config . react . sprockets_strategy )
108+ else
109+ # pass, Sprockets is not preset
108110 end
109111 end
110112 end
You can’t perform that action at this time.
0 commit comments