diff --git a/plugins/pluginManager.js b/plugins/pluginManager.js index fd1969b0a91..11b3b4dbea2 100644 --- a/plugins/pluginManager.js +++ b/plugins/pluginManager.js @@ -2682,7 +2682,14 @@ var pluginManager = function pluginManager() { } logDbRead.d(name + " " + collection + " %j %j" + at, query, options); logDbRead.d("From connection %j", countlyDb._cly_debug); - return handlePromiseErrors(this["_" + name](query, options), e, copyArguments(arguments, name), logForReads(callback, e, copyArguments(arguments, name))); + if (name === "findOneAndDelete" && !options.remove) { + return handlePromiseErrors(this["_" + name](query, options).then(result => ({ value: result })), + e, copyArguments(arguments, name), logForReads(callback, e, copyArguments(arguments, name)) + ); + } + else { + return handlePromiseErrors(this["_" + name](query, options), e, copyArguments(arguments, name), logForReads(callback, e, copyArguments(arguments, name))); + } }; }; diff --git a/plugins/star-rating/frontend/public/javascripts/countly.models.js b/plugins/star-rating/frontend/public/javascripts/countly.models.js index a1daca86e94..808400bb4d8 100644 --- a/plugins/star-rating/frontend/public/javascripts/countly.models.js +++ b/plugins/star-rating/frontend/public/javascripts/countly.models.js @@ -1,4 +1,4 @@ -/*global countlyCommon, app, jQuery,_ $*/ +/*global countlyCommon, app, jQuery $*/ (function(starRatingPlugin) { var _pv = {}; // feedbackd datas