mirror of
https://github.com/enzet/map-machine.git
synced 2025-04-29 10:17:23 +02:00
Catch case, if value to update with is None
This commit is contained in:
parent
825eb34191
commit
eaf359536a
1 changed files with 2 additions and 0 deletions
|
@ -15,6 +15,8 @@ class MinMax:
|
|||
|
||||
def update(self, value: Any) -> None:
|
||||
"""Update minimum and maximum with new value."""
|
||||
if value is None:
|
||||
return
|
||||
self.min_ = value if not self.min_ or value < self.min_ else self.min_
|
||||
self.max_ = value if not self.max_ or value > self.max_ else self.max_
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue