We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 129e833 commit 4f2e264Copy full SHA for 4f2e264
src/amplitude-client.js
@@ -254,17 +254,15 @@ AmplitudeClient.prototype._migrateUnsentEvents = function _migrateUnsentEvents(c
254
255
if (itemsToSet.length > 0) {
256
Promise.all(itemsToSet).then(() => {
257
- Promise.all(itemsToRemove).then(cb);
+ Promise.all(itemsToRemove);
258
}).catch((err) => {
259
this.options.onError(err);
260
});
261
- } else {
262
- cb();
263
}
264
265
266
267
- }).catch((err) => {
+ })
+ .then(cb)
+ .catch((err) => {
268
269
270
};
0 commit comments