Skip to content

Commit

Permalink
Issue #SB-17879 added: to normalise sharedPreferences with localStora…
Browse files Browse the repository at this point in the history
…ge values
  • Loading branch information
arafath committed Feb 24, 2020
1 parent 2cc337e commit c0fb2eb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class SharedPreferencesAndroid implements SharedPreferences {
const value = localStorage.getItem(key);

if (value) {
localStorage.setItem(key, '');
localStorage.removeItem(key);

return this.putString(key, value).pipe(
mapTo(value)
Expand Down Expand Up @@ -57,7 +57,7 @@ export class SharedPreferencesAndroid implements SharedPreferences {
const value = localStorage.getItem(key);

if (value) {
localStorage.setItem(key, '');
localStorage.removeItem(key);

return this.putBoolean(key, value === 'true').pipe(
mapTo(value === 'true')
Expand Down

0 comments on commit c0fb2eb

Please sign in to comment.