Skip to content

Commit

Permalink
Data: Remove _ prefix from local variable
Browse files Browse the repository at this point in the history
Not conventional
  • Loading branch information
aduth committed Aug 3, 2018
1 parent 4f630b1 commit e4a1c0e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/data/src/plugins/persistence/storage/object.js
Original file line number Diff line number Diff line change
@@ -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 );
},
};

Expand Down

0 comments on commit e4a1c0e

Please sign in to comment.