From f5c9008a6d20b503e21c0d8130e52be526a5bfe8 Mon Sep 17 00:00:00 2001 From: Lorenzo Cesana Date: Tue, 13 Nov 2018 16:09:33 +0100 Subject: [PATCH] Fix: Allow excluding packages and private packages together --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index f292f1e..1d7841f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -426,7 +426,7 @@ exports.init = function(options, callback) { if (options.excludePrivatePackages) { Object.keys(filtered).forEach(function(key) { - if (restricted[key].private) { + if (restricted[key] && restricted[key].private) { delete restricted[key]; } });