diff --git a/lib/workers/repository/onboarding/pr/errors-warnings.js b/lib/workers/repository/onboarding/pr/errors-warnings.js
index cdf9bf3705364b9453f3d5a4c69c00dc2cbea421..44a40f491c5c27d6c04c5b83b4e4a10925d52d28 100644
--- a/lib/workers/repository/onboarding/pr/errors-warnings.js
+++ b/lib/workers/repository/onboarding/pr/errors-warnings.js
@@ -30,10 +30,10 @@ function getDepWarnings(packageFiles) {
   try {
     const warnings = [];
     const warningFiles = [];
-    for (const files of Object.values(packageFiles)) {
-      for (const file of files)
+    for (const files of Object.values(packageFiles || {})) {
+      for (const file of files || [])
         if (file.deps) {
-          for (const dep of file.deps) {
+          for (const dep of file.deps || []) {
             if (dep.warnings && dep.warnings.length) {
               const message = dep.warnings[0].message;
               if (!warnings.includes(message)) {