@@ -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 {
@@ -259,7 +259,7 @@ export class BatchUploader {
259259 const { verbose } = this . mpInstance . Logger ;
260260
261261 this . eventsQueuedForProcessing . push ( event ) ;
262- if ( this . OfflineStorage && this . eventVault ) {
262+ if ( this . offlineStorageEnabled && this . eventVault ) {
263263 this . eventVault . store ( this . eventsQueuedForProcessing ) ;
264264 }
265265
@@ -375,7 +375,7 @@ export class BatchUploader {
375375 const currentEvents : SDKEvent [ ] = this . eventsQueuedForProcessing ;
376376
377377 this . eventsQueuedForProcessing = [ ] ;
378- if ( this . OfflineStorage && this . eventVault ) {
378+ if ( this . offlineStorageEnabled && this . eventVault ) {
379379 this . eventVault . store ( [ ] ) ;
380380 }
381381
@@ -389,7 +389,7 @@ export class BatchUploader {
389389 }
390390
391391 // Top Load any older Batches from Offline Storage so they go out first
392- if ( this . OfflineStorage && this . batchVault ) {
392+ if ( this . offlineStorageEnabled && this . batchVault ) {
393393 this . batchesQueuedForProcessing . unshift (
394394 ...this . batchVault . retrieve ( )
395395 ) ;
@@ -422,7 +422,7 @@ export class BatchUploader {
422422 }
423423
424424 // Update Offline Storage with current state of batch queue
425- if ( ! useBeacon && this . OfflineStorage && this . batchVault ) {
425+ if ( ! useBeacon && this . offlineStorageEnabled && this . batchVault ) {
426426 // Note: since beacon is "Fire and forget" it will empty `batchesThatDidNotUplod`
427427 // regardless of whether the batches were successfully uploaded or not. We should
428428 // therefore NOT overwrite Offline Storage when beacon returns, so that we can retry
0 commit comments