File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff 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 #
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 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 ) ;
You can’t perform that action at this time.
0 commit comments