diff --git a/packages/data/src/plugins/persistence/storage/object.js b/packages/data/src/plugins/persistence/storage/object.js index 1f5e61d1a8234..ae9b120b2f4b2 100644 --- a/packages/data/src/plugins/persistence/storage/object.js +++ b/packages/data/src/plugins/persistence/storage/object.js @@ -1,22 +1,22 @@ -let _objectStorage; +let objectStorage; const storage = { getItem( key ) { - if ( ! _objectStorage || ! _objectStorage[ key ] ) { + if ( ! objectStorage || ! objectStorage[ key ] ) { return null; } - return _objectStorage[ key ]; + return objectStorage[ key ]; }, setItem( key, value ) { - if ( ! _objectStorage ) { + if ( ! objectStorage ) { storage.clear(); } - _objectStorage[ key ] = String( value ); + objectStorage[ key ] = String( value ); }, clear() { - _objectStorage = Object.create( null ); + objectStorage = Object.create( null ); }, };