Skip to content

Commit b43ded7

Browse files
committed
Run make release on changed files and add check if migration has already occurred
1 parent 2f05e67 commit b43ded7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Please see our [installation guide](https://amplitude.zendesk.com/hc/en-us/artic
1111
[![npm version](https://badge.fury.io/js/amplitude-js.svg)](https://badge.fury.io/js/amplitude-js)
1212
[![Bower version](https://badge.fury.io/bo/amplitude-js.svg)](https://badge.fury.io/bo/amplitude-js)
1313

14-
[5.7.0 - Released on November 22, 2019](https://github.com/amplitude/Amplitude-JavaScript/releases/latest)
14+
[5.7.1 - Released on December 3, 2019](https://github.com/amplitude/Amplitude-JavaScript/releases/latest)
1515

1616

1717
# JavaScript SDK Reference #

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) {
245+
if (!!unsentEventsString && !unsentEventsString.includes(this._storageSuffix)) {
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) {
250+
if (!!unsentIdentifyKey && unsentIdentifyKey.includes(this._storageSuffix)) {
251251
itemsToSet.push(AsyncStorage.setItem(this.options.unsentIdentifyKey + this._storageSuffix, JSON.stringify(unsentIdentifyKey)));
252252
itemsToRemove.push(AsyncStorage.removeItem(this.options.unsentIdentifyKey));
253253
}

src/amplitude-snippet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
var amplitude = window.amplitude || {'_q':[],'_iq':{}};
33
var as = document.createElement('script');
44
as.type = 'text/javascript';
5-
as.integrity = 'sha384-rSEVPt+HsYVwBs0EY4dB3fOcSZOW9cbAQV2CqsLFDjNbdiNyoXcGruquK0IyWxAZ';
5+
as.integrity = 'sha384-Ik1BT1T0ZKcBQi93L3Lh8pYLQvUANkj37BjU140rtlIwQSj9ePR4dOoqfWj9u5qU';
66
as.crossOrigin = 'anonymous';
77
as.async = true;
8-
as.src = 'https://cdn.amplitude.com/libs/amplitude-5.7.0-min.gz.js';
8+
as.src = 'https://cdn.amplitude.com/libs/amplitude-5.7.1-min.gz.js';
99
as.onload = function() {if(!window.amplitude.runQueuedFunctions) {console.log('[Amplitude] Error: could not load SDK');}};
1010
var s = document.getElementsByTagName('script')[0];
1111
s.parentNode.insertBefore(as, s);

0 commit comments

Comments
 (0)