Browse Source

Code optimization

main
Cédric Belin 3 months ago
parent
commit
0b90256375
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/src/web_storage.dart

+ 1
- 1
lib/src/web_storage.dart View File

@@ -66,7 +66,7 @@ abstract class WebStorage extends Object with MapMixin<String, String> { // igno

/// Gets the value associated to the specified [key].
/// Returns the given [defaultValue] if the storage item does not exist.
String get(String key, [String defaultValue]) => containsKey(key) ? _backend[key] : defaultValue;
String get(String key, [String defaultValue]) => _backend[key] ?? defaultValue;

/// Gets the deserialized value associated to the specified [key].
/// Returns the given [defaultValue] if the storage item does not exist.


Loading…
Cancel
Save