Skip to content

Commit

Permalink
Merge branch 'main' of github.com:zauberzeug/nicegui
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Oct 6, 2023
2 parents 427c38b + 03180ab commit 4cd7475
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nicegui/functions/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,7 @@ def notify(message: Any, *,
options = {ARG_MAP.get(key, key): value for key, value in locals().items() if key != 'kwargs' and value is not None}
options['message'] = str(message)
options.update(kwargs)
outbox.enqueue_message('notify', options, globals.get_client().id)
if globals.get_client().has_socket_connection:
outbox.enqueue_message('notify', options, globals.get_client().id)
else:
globals.log.warning(f'Ignoring notification "{message}" because the client is not connected.')

0 comments on commit 4cd7475

Please sign in to comment.