Skip to content

Commit be73bb8

Browse files
committed
Remove unnecessary check for this._storageSuffix in the value (bc it should exist in the key, not the value)
1 parent b43ded7 commit be73bb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/amplitude-client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ AmplitudeClient.prototype._migrateUnsentEvents = function _migrateUnsentEvents(c
242242
var itemsToSet = [];
243243
var itemsToRemove = [];
244244

245-
if (!!unsentEventsString && !unsentEventsString.includes(this._storageSuffix)) {
245+
if (!!unsentEventsString) {
246246
itemsToSet.push(AsyncStorage.setItem(this.options.unsentKey + this._storageSuffix, JSON.stringify(unsentEventsString)));
247247
itemsToRemove.push(AsyncStorage.removeItem(this.options.unsentKey));
248248
}
249249

250-
if (!!unsentIdentifyKey && unsentIdentifyKey.includes(this._storageSuffix)) {
250+
if (!!unsentIdentifyKey) {
251251
itemsToSet.push(AsyncStorage.setItem(this.options.unsentIdentifyKey + this._storageSuffix, JSON.stringify(unsentIdentifyKey)));
252252
itemsToRemove.push(AsyncStorage.removeItem(this.options.unsentIdentifyKey));
253253
}

0 commit comments

Comments
 (0)