Skip to content

Commit 86479c4

Browse files
committed
Fix Tests. TODO: add tests for react native
1 parent e99863f commit 86479c4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/amplitude-client.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ AmplitudeClient.prototype.init = function init(apiKey, opt_userId, opt_config, o
212212
});
213213
} else {
214214
if (this.options.saveEvents) {
215-
this._unsentEvents = this._loadSavedUnsentEvents(this.options.unsentKey + this._storageSuffix).concat(this._unsentEvents);
216-
this._unsentIdentifys = this._loadSavedUnsentEvents(this.options.unsentIdentifyKey + this._storageSuffix).concat(this._unsentIdentifys);
215+
this._unsentEvents = this._loadSavedUnsentEvents(this.options.unsentKey).concat(this._unsentEvents);
216+
this._unsentIdentifys = this._loadSavedUnsentEvents(this.options.unsentIdentifyKey).concat(this._unsentIdentifys);
217217
}
218218
initFromStorage();
219219
this.runQueuedFunctions();
@@ -240,15 +240,15 @@ AmplitudeClient.prototype._migrateUnsentEvents = function _migrateUnsentEvents(c
240240
var unsentIdentifyKey = values[1];
241241
Promise.all([
242242
AsyncStorage.setItem(this.options.unsentKey + this._storageSuffix, unsentEventsString),
243-
AsyncStorage.setItem(this.options.unsentIdentifyKey + this._storageSuffix, unsentIdentifyKey ),
243+
AsyncStorage.setItem(this.options.unsentIdentifyKey + this._storageSuffix, unsentIdentifyKey),
244244
]).then(() => {
245245
Promise.all([
246246
AsyncStorage.removeItem(this.options.unsentKey),
247247
AsyncStorage.removeItem(this.options.unsentIdentifyKey),
248248
]).then(cb);
249249
}).catch((err) => {
250250
this.options.onError(err);
251-
});;
251+
});
252252
}
253253
}).catch((err) => {
254254
this.options.onError(err);

0 commit comments

Comments
 (0)