Skip to content

Commit

Permalink
fix: a data value of 0 turns into {}
Browse files Browse the repository at this point in the history
Don't use truthyness here, but since None would also be a valid
value, remove it entirely.
  • Loading branch information
mariobuikhuizen committed Nov 14, 2024
1 parent c63b26c commit d557ff5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipyvue/VueWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _fire_event(self, event, data=None):
dispatcher = self._event_handlers_map[event]
# we don't call via the dispatcher, since that eats exceptions
for callback in dispatcher.callbacks:
callback(self, event, data or {})
callback(self, event, data)

def _handle_event(self, _, content, buffers):
event = content.get("event", "")
Expand Down

0 comments on commit d557ff5

Please sign in to comment.