backend-manager 3.2.56 → 3.2.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -188,7 +188,7 @@ Usage.prototype.increment = function (path, value, options) {
|
|
|
188
188
|
const Manager = self.Manager;
|
|
189
189
|
const assistant = self.assistant;
|
|
190
190
|
|
|
191
|
-
value = value
|
|
191
|
+
value = typeof value === 'undefined' ? 1 : value;
|
|
192
192
|
|
|
193
193
|
options = options || {};
|
|
194
194
|
options.id = options.id || null;
|
|
@@ -227,7 +227,7 @@ Usage.prototype.set = function (path, value) {
|
|
|
227
227
|
// Update total and period
|
|
228
228
|
const resolved = `usage.${path}.period`;
|
|
229
229
|
|
|
230
|
-
value = value
|
|
230
|
+
value = typeof value === 'undefined' ? 0 : value;
|
|
231
231
|
|
|
232
232
|
// Set the value
|
|
233
233
|
_.set(self.user, resolved, value);
|