summaryrefslogtreecommitdiff
path: root/app/presenters/packages/npm/package_presenter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/presenters/packages/npm/package_presenter.rb')
-rw-r--r--app/presenters/packages/npm/package_presenter.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/presenters/packages/npm/package_presenter.rb b/app/presenters/packages/npm/package_presenter.rb
index c30dfa6196b..1f94187204f 100644
--- a/app/presenters/packages/npm/package_presenter.rb
+++ b/app/presenters/packages/npm/package_presenter.rb
@@ -26,7 +26,11 @@ module Packages
.preload_npm_metadatum
batched_packages.each do |package|
- package_file = package.package_files.last
+ package_file = if Feature.enabled?(:packages_installable_package_files, default_enabled: :yaml)
+ package.installable_package_files.last
+ else
+ package.package_files.last
+ end
next unless package_file