Skip to content

Commit 47d2a9c

Browse files
committed
handle missing handler
1 parent 96ea2c8 commit 47d2a9c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ltk/widgets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,8 @@ def __init__(self, handler=None, style=None):
901901

902902
@callback
903903
def _handle_content(event):
904+
if not handler:
905+
return
904906
# see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file
905907
file = event.target.files.item(0)
906908
reader = window.FileReader.new()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66

77
[project]
88
name = "pyscript-ltk"
9-
version = "0.2.12"
9+
version = "0.2.13"
1010
description = "A little toolkit for writing UIs in PyScript"
1111
readme = "README.md"
1212
authors = [{ name = "Chris Laffra", email = "[email protected]" }]

0 commit comments

Comments
 (0)