gemfile entry method need to return an empty array rather than nil (#27318)

This fixes the following error when executing rails new command.

```
(erb):9:in `block in template': undefined method `comment' for nil:NilClass (NoMethodError)
```

Follow up to #27288
This commit is contained in:
Yuji Yaginuma 2016-12-10 09:21:28 +09:00 committed by David Heinemeier Hansson
parent ecddc0468d
commit c16296c795

@ -320,10 +320,10 @@ def assets_gemfile_entry
end
def webpacker_gemfile_entry
if options[:webpack]
comment = "Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker"
GemfileEntry.github "webpacker", "rails/webpacker", nil, comment
end
return [] unless options[:webpack]
comment = "Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker"
GemfileEntry.github "webpacker", "rails/webpacker", nil, comment
end
def jbuilder_gemfile_entry