From 5b52d166a077ff1ba27395d749f42bfc3097625d Mon Sep 17 00:00:00 2001 From: Marvin Liu Date: Tue, 17 Jan 2023 16:43:33 -0800 Subject: [PATCH] fix: remove events when 200, no need to check response (#572) --- 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.