backend-manager 3.0.30 → 3.0.32
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
|
@@ -54,12 +54,17 @@ Utilities.prototype.iterateCollection = function (callback, options) {
|
|
|
54
54
|
|
|
55
55
|
batch++;
|
|
56
56
|
|
|
57
|
+
if (snap.docs.length === 0) {
|
|
58
|
+
return resolve();
|
|
59
|
+
}
|
|
60
|
+
|
|
57
61
|
if (options.log) {
|
|
58
62
|
console.log('Processing batch:', batch);
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
callback({
|
|
62
|
-
snap: snap,
|
|
66
|
+
snap: snap,
|
|
67
|
+
docs: snap.docs.map(x => x),
|
|
63
68
|
}, batch)
|
|
64
69
|
.then(r => {
|
|
65
70
|
// Construct a new query starting at this document
|
|
@@ -106,6 +111,10 @@ Utilities.prototype.iterateUsers = function (callback, options) {
|
|
|
106
111
|
|
|
107
112
|
batch++;
|
|
108
113
|
|
|
114
|
+
if (listUsersResult.users.length === 0) {
|
|
115
|
+
return resolve();
|
|
116
|
+
}
|
|
117
|
+
|
|
109
118
|
if (options.log) {
|
|
110
119
|
console.log('Processing batch:', batch);
|
|
111
120
|
}
|