@@ -43,7 +43,7 @@ export class BatchUploader {
4343 batchingEnabled : boolean ;
4444 private eventVault : SessionStorageVault < SDKEvent [ ] > ;
4545 private batchVault : LocalStorageVault < Batch [ ] > ;
46- private OfflineStorage : boolean = false ;
46+ private offlineStorageEnabled : boolean = false ;
4747 private uploader : AsyncUploader ;
4848 private lastASTEventTime : number = 0 ;
4949 private readonly AST_DEBOUNCE_MS : number = 1000 ; // 1 second debounce
@@ -72,11 +72,11 @@ export class BatchUploader {
7272
7373 // Cache Offline Storage Availability boolean
7474 // so that we don't have to check it every time
75- this . OfflineStorage =
75+ this . offlineStorageEnabled =
7676 this . isOfflineStorageAvailable ( ) &&
77- ! mpInstance . _Store . getPrivacyFlag ( 'Events ' ) ;
77+ ! mpInstance . _Store . getPrivacyFlag ( 'OfflineEvents ' ) ;
7878
79- if ( this . OfflineStorage ) {
79+ if ( this . offlineStorageEnabled ) {
8080 this . eventVault = new SessionStorageVault < SDKEvent [ ] > (
8181 `${ mpInstance . _Store . storageName } -events` ,
8282 {
@@ -262,7 +262,7 @@ export class BatchUploader {
262262 const { verbose } = this . mpInstance . Logger ;
263263
264264 this . eventsQueuedForProcessing . push ( event ) ;
265- if ( this . OfflineStorage && this . eventVault ) {
265+ if ( this . offlineStorageEnabled && this . eventVault ) {
266266 this . eventVault . store ( this . eventsQueuedForProcessing ) ;
267267 }
268268
@@ -378,7 +378,7 @@ export class BatchUploader {
378378 const currentEvents : SDKEvent [ ] = this . eventsQueuedForProcessing ;
379379
380380 this . eventsQueuedForProcessing = [ ] ;
381- if ( this . OfflineStorage && this . eventVault ) {
381+ if ( this . offlineStorageEnabled && this . eventVault ) {
382382 this . eventVault . store ( [ ] ) ;
383383 }
384384
@@ -392,7 +392,7 @@ export class BatchUploader {
392392 }
393393
394394 // Top Load any older Batches from Offline Storage so they go out first
395- if ( this . OfflineStorage && this . batchVault ) {
395+ if ( this . offlineStorageEnabled && this . batchVault ) {
396396 this . batchesQueuedForProcessing . unshift (
397397 ...this . batchVault . retrieve ( )
398398 ) ;
@@ -425,7 +425,7 @@ export class BatchUploader {
425425 }
426426
427427 // Update Offline Storage with current state of batch queue
428- if ( ! useBeacon && this . OfflineStorage && this . batchVault ) {
428+ if ( ! useBeacon && this . offlineStorageEnabled && this . batchVault ) {
429429 // Note: since beacon is "Fire and forget" it will empty `batchesThatDidNotUplod`
430430 // regardless of whether the batches were successfully uploaded or not. We should
431431 // therefore NOT overwrite Offline Storage when beacon returns, so that we can retry
0 commit comments