spebbe / dartz

Functional programming in Dart
MIT License
749 stars 60 forks source link

Fix IMap.getKey() to return None() when a non-existent key is checked #124

Open rich-j opened 11 months ago

rich-j commented 11 months ago

Using IMap.getKey() to check if a key exists should return None() if the key doesn't exist. Instead it was throwing "Null check operator used on a null value".

This fix basically copies the code from the value .get() method that does correctly return None()