Pārlūkot izejas kodu

Improve memoized args (#771)

Nikhil Rao 2 gadi atpakaļ
vecāks
revīzija
bb29bd864d
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      pynecone/components/component.py

+ 2 - 0
pynecone/components/component.py

@@ -509,6 +509,8 @@ class CustomComponent(Component):
                 value = self._create_event_chain(key, value)
                 value = self._create_event_chain(key, value)
                 self.props[format.to_camel_case(key)] = value
                 self.props[format.to_camel_case(key)] = value
                 continue
                 continue
+            if not types._issubclass(type_, Var):
+                type_ = Var[type_]
             type_ = types.get_args(type_)[0]
             type_ = types.get_args(type_)[0]
             if types._issubclass(type_, Base):
             if types._issubclass(type_, Base):
                 try:
                 try: