From c0fb2ebf838036fd92b9a6bb290dedb2a55a5523 Mon Sep 17 00:00:00 2001 From: arafath Date: Mon, 24 Feb 2020 14:45:20 +0530 Subject: [PATCH] Issue #SB-17879 added: to normalise sharedPreferences with localStorage values --- .../shared-preferences/impl/shared-preferences-android.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/shared-preferences/impl/shared-preferences-android.ts b/src/util/shared-preferences/impl/shared-preferences-android.ts index 72a330dbb..bf1a9597a 100644 --- a/src/util/shared-preferences/impl/shared-preferences-android.ts +++ b/src/util/shared-preferences/impl/shared-preferences-android.ts @@ -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) @@ -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')