From 30b2cab98ec02a80dc790aced752b89624e1940a Mon Sep 17 00:00:00 2001 From: "Kyle E. Mitchell" Date: Mon, 22 Aug 2022 12:57:12 -0700 Subject: [PATCH] Fix logic error https://github.com/jslicense/licensee.js/pull/77#discussion_r951855122 --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index d65cb15..eecfa99 100644 --- a/index.js +++ b/index.js @@ -35,9 +35,6 @@ function licensee (configuration, path, callback) { } else { var arborist = new Arborist({ path }) arborist.loadActual({ forceActual: true }) - .catch(function (error) { - return callback(error) - }) .then(function (tree) { var children = Array.from(tree.children.values()) if (configuration.filterPackages) { @@ -45,6 +42,9 @@ function licensee (configuration, path, callback) { } callback(null, findIssues(configuration, children, [])) }) + .catch(function (error) { + return callback(error) + }) } }