fix pydom issue with micropython, created by the monkeypatch around JsProxy

This commit is contained in:
Fabio Pliger
2024-05-07 11:41:58 -05:00
parent 313824d5ae
commit 62d31d996f

View File

@@ -1,3 +1,5 @@
import inspect
try: try:
from typing import Any from typing import Any
except ImportError: except ImportError:
@@ -121,7 +123,7 @@ class Element(BaseElement):
# TODO: this is Pyodide specific for now!!!!!! # TODO: this is Pyodide specific for now!!!!!!
# if we get passed a JSProxy Element directly we just map it to the # if we get passed a JSProxy Element directly we just map it to the
# higher level Python element # higher level Python element
if isinstance(child, JsProxy): if inspect.isclass(JsProxy) and isinstance(child, JsProxy):
return self.append(Element(child)) return self.append(Element(child))
elif isinstance(child, Element): elif isinstance(child, Element):