Skip to content

Commit

Permalink
Don't send empty keys down protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwillchen committed Nov 27, 2023
1 parent 78bdf28 commit 42d464d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion optic/component_helpers/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ def insert_component(type: pb.Type, key: str | None = None):
"""
Inserts a component into the current session's current node.
"""

runtime.session().current_node().children.append(
pb.Component(key=pb.Key(key=key or ""), type=type)
pb.Component(key=pb.Key(key=key) if key else None, type=type)
)


Expand Down

0 comments on commit 42d464d

Please sign in to comment.