diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/tasks/yarn.rake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/tasks/yarn.rake b/railties/lib/rails/tasks/yarn.rake index 7c5e266e3e..e95bfe1da6 100644 --- a/railties/lib/rails/tasks/yarn.rake +++ b/railties/lib/rails/tasks/yarn.rake @@ -6,4 +6,6 @@ namespace :yarn do end # Run Yarn prior to Sprockets assets precompilation, so dependencies are available for use. -Rake::Task["assets:precompile"].enhance [ "yarn:install" ] +if Rake::Task.task_defined?("assets:precompile") + Rake::Task["assets:precompile"].enhance [ "yarn:install" ] +end |