Skip to content

Commit

Permalink
fixed state exception if key is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
mijorus committed Jun 6, 2023
1 parent 5ec6093 commit 4d185c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/State.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def set__(self, key, value):
cb(value)

def get__(self, key: str):
return self.props[key]
return self.props[key] if key in self.props else None

def connect__(self, key: str, cb: Callable):
if not key in self.propscb:
Expand Down

0 comments on commit 4d185c8

Please sign in to comment.