From ef8feb28008443b89afc29d0a8d14fa57c99a8ff Mon Sep 17 00:00:00 2001 From: Claudio Torres Date: Mon, 31 Jul 2023 22:06:36 -0400 Subject: [PATCH] 'cb is not a function' fix on prey-user usage --- lib/conf/tasks/prey_owl.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/conf/tasks/prey_owl.js b/lib/conf/tasks/prey_owl.js index 387da5c12..01d2e0bba 100644 --- a/lib/conf/tasks/prey_owl.js +++ b/lib/conf/tasks/prey_owl.js @@ -119,7 +119,8 @@ const get_prey_user_versions = (preyUserVersion, cb) => { // otherwise otherwise check if exists the configuration of com.prey.owl.plist or com.prey.new_owl.plist const compareVersionsDaemon = (preyUserOldVersion, preyUserVersion, cb) => { if (is_greater_or_equal(preyUserOldVersion.trim(), preyUserVersion.trim())) { - return cb && cb("New version < old version"); + if (typeof (cb) === 'function') return cb && cb("New version < old version"); + return 0; } testExistingConfigurations(cb); };