Hitsu91

null check on RxMap and RxSet constructors

@@ -9,7 +9,7 @@ import '../rx_typedefs/rx_typedefs.dart'; @@ -9,7 +9,7 @@ import '../rx_typedefs/rx_typedefs.dart';
9 9
10 class RxMap<K, V> implements RxInterface<Map<K, V>>, Map<K, V> { 10 class RxMap<K, V> implements RxInterface<Map<K, V>>, Map<K, V> {
11 RxMap([Map<K, V> initial]) { 11 RxMap([Map<K, V> initial]) {
12 - _value = initial; 12 + if (initial != null) _value = initial;
13 } 13 }
14 14
15 @override 15 @override
@@ -9,7 +9,7 @@ import '../rx_typedefs/rx_typedefs.dart'; @@ -9,7 +9,7 @@ import '../rx_typedefs/rx_typedefs.dart';
9 9
10 class RxSet<E> implements Set<E>, RxInterface<Set<E>> { 10 class RxSet<E> implements Set<E>, RxInterface<Set<E>> {
11 RxSet([Set<E> initial]) { 11 RxSet([Set<E> initial]) {
12 - _set = initial; 12 + if (initial != null) _set = initial;
13 } 13 }
14 14
15 Set<E> _set = <E>{}; 15 Set<E> _set = <E>{};