From f81e591ac5fe45be9bc7fbefab1256ae9b32683e Mon Sep 17 00:00:00 2001 From: Martii Date: Tue, 23 Feb 2016 03:35:51 -0700 Subject: [PATCH] Post fix typo * Show the actual model name in stderr * Elaborated more on line notes Applies to #126 and trounces profoundly upon #262 (comment)https://github.com/OpenUserJs/OpenUserJS.org/issues/262#issuecomment-57592127 --- libs/remove.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/remove.js b/libs/remove.js index 42e672323..819f39c71 100644 --- a/libs/remove.js +++ b/libs/remove.js @@ -105,12 +105,12 @@ function remove(aModel, aContent, aUser, aReason, aAutomated, aCallback) { aContent.remove(function (aErr) { if (aErr) { console.error('Failed to remove', aModel.modelName); - aCallback(aErr); + aCallback(aErr); // NOTE: Same as `true` but specific e.g. stop all removal(s) return; } if (aModel.modelName === 'User') { - aCallback(true); // NOTE: Stop any series removals + aCallback(true); // NOTE: Stop any series removals and done } else { aCallback(null); // NOTE: Continue any series and non-User single removals } @@ -128,7 +128,7 @@ exports.remove = function (aModel, aContent, aUser, aReason, aCallback) { if (aModel.modelName !== 'User') { remove(aModel, aContent, aUser, aReason, false, function (aErr) { if (aErr) { - console.warn('Failed to remove User\n', aErr); + console.warn('Failed to remove', aModel.modelName, '\n', aErr); aCallback(false); return; }