diff --git a/lib/datasource/packagist/index.js b/lib/datasource/packagist/index.js
index 0dc04609c5c442b3e43db0532c7e33284b4d01e9..0523ae327da7e4d98c40c88295d6d24192047604 100644
--- a/lib/datasource/packagist/index.js
+++ b/lib/datasource/packagist/index.js
@@ -245,10 +245,11 @@ async function packageLookup(regUrl, name) {
 
 async function getPkgReleases(purl, config = {}) {
   const { fullname: name } = purl;
+  const { registryUrls } = config;
   logger.trace(`getPkgReleases(${name})`);
   const regUrls = [];
-  if (config.registryUrls) {
-    for (const regUrl of config.registryUrls) {
+  if (registryUrls) {
+    for (const regUrl of registryUrls) {
       if (regUrl.type === 'composer') {
         regUrls.push(regUrl.url);
       } else if (regUrl.type === 'package') {
@@ -262,9 +263,8 @@ async function getPkgReleases(purl, config = {}) {
     logger.debug({ regUrls }, 'Packagist custom registry URLs');
   }
   if (
-    !is.nonEmptyArray(config.registryUrls) ||
-    config.registryUrls[config.registryUrls.length - 1]['packagist.org'] !==
-      false
+    !is.nonEmptyArray(registryUrls) ||
+    registryUrls[registryUrls.length - 1]['packagist.org'] !== false
   ) {
     regUrls.push('https://packagist.org');
   } else {