From 9aac984cbbfef22182ee42b51a193c0b47146ad6 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Tue, 30 May 2017 15:13:32 -0700 Subject: finalize: Guard against being unable to compute _requested source Credit: @iarna --- lib/install/action/finalize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/install/action/finalize.js b/lib/install/action/finalize.js index ba38e602f..ded2350df 100644 --- a/lib/install/action/finalize.js +++ b/lib/install/action/finalize.js @@ -90,6 +90,6 @@ module.exports = function (staging, pkg, log) { module.exports.rollback = function (top, staging, pkg, next) { const requested = pkg.package._requested || getRequested(pkg) - if (requested.type === 'directory') return next() + if (requested && requested.type === 'directory') return next() gentlyRm(pkg.realpath, false, top, next) } -- cgit v1.2.3