From d557ff523dbb936e64e63fd632409ae4f4f50d87 Mon Sep 17 00:00:00 2001 From: Mario Buikhuizen Date: Thu, 14 Nov 2024 12:54:38 +0100 Subject: [PATCH] fix: a data value of `0` turns into `{}` Don't use truthyness here, but since None would also be a valid value, remove it entirely. --- ipyvue/VueWidget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipyvue/VueWidget.py b/ipyvue/VueWidget.py index b417b3b..465f6a7 100644 --- a/ipyvue/VueWidget.py +++ b/ipyvue/VueWidget.py @@ -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", "")