From f7b605bd88f5e329c54a24dec146acbb7096b596 Mon Sep 17 00:00:00 2001 From: Marvin Liu Date: Tue, 17 Jan 2023 16:22:21 -0800 Subject: [PATCH] fix: remove events when 200, no need to check response --- src/amplitude-client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amplitude-client.js b/src/amplitude-client.js index 93069559..d4f5de02 100644 --- a/src/amplitude-client.js +++ b/src/amplitude-client.js @@ -1916,7 +1916,7 @@ AmplitudeClient.prototype.sendEvents = function sendEvents() { new Request(url, data, this.options.headers).send(function (status, response) { scope._sending = false; try { - if (status === 200 && response === 'success') { + if (status === 200) { scope.removeEvents(maxEventId, maxIdentifyId, status, response); // Update the event cache after the removal of sent events.