Skip to content

Commit

Permalink
handle missing handler
Browse files Browse the repository at this point in the history
  • Loading branch information
laffra committed Nov 30, 2024
1 parent 96ea2c8 commit 47d2a9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ltk/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,8 @@ def __init__(self, handler=None, style=None):

@callback
def _handle_content(event):
if not handler:
return
# see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file
file = event.target.files.item(0)
reader = window.FileReader.new()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pyscript-ltk"
version = "0.2.12"
version = "0.2.13"
description = "A little toolkit for writing UIs in PyScript"
readme = "README.md"
authors = [{ name = "Chris Laffra", email = "chris@chrislaffra.com" }]
Expand Down

0 comments on commit 47d2a9c

Please sign in to comment.