Open vibin opened 6 years ago
That kind of makes sense as SharedPreferences can be types other than Strings, but localStorage only supports String values. Perhaps for adding a new shared pref value Stetho could default to making it a String?
So changing from:
if (existingValue == null) {
throw new DOMStorageAssignmentException(
"Unsupported: cannot add new key " + key + " due to lack of type inference");
} else {
...
to:
if (existingValue == null) {
existingValue = value
}
SharedPreferences.Editor editor = prefs.edit();
try {
assignByType(editor, key, SharedPreferencesHelper.valueFromString(value, existingValue));
...
Hi, I can edit existing keys/values of SharedPreferences via Stetho, but adding a new one throws this error: "Unsupported: cannot add new key [redacted] due to lack of type inference".