From 14dff27d454c66b2b4710eac166f29719ba4fbe2 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 19 Nov 2018 21:09:33 -0800 Subject: [PATCH] boxUpdateInfo cannot be null here --- src/updater.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/updater.js b/src/updater.js index ff5a82151..9310cdb61 100644 --- a/src/updater.js +++ b/src/updater.js @@ -186,12 +186,10 @@ function doUpdate(boxUpdateInfo, callback) { } function update(boxUpdateInfo, auditSource, callback) { - assert.strictEqual(typeof boxUpdateInfo, 'object'); + assert(boxUpdateInfo && typeof boxUpdateInfo === 'object'); assert.strictEqual(typeof auditSource, 'object'); assert.strictEqual(typeof callback, 'function'); - if (!boxUpdateInfo) return callback(null); - var error = locker.lock(locker.OP_BOX_UPDATE); if (error) return callback(new UpdaterError(UpdaterError.BAD_STATE, error.message));