Skip to content

Commit c690c99

Browse files
author
Aubruz
committed
Verify props is array before using append
1 parent bf2e9cf commit c690c99

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name="mainframe-bot-api",
7-
version="1.2.0",
7+
version="1.2.2",
88
author="aubruz",
99
author_email="[email protected]",
1010
packages=find_packages(),

mainframe/component.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def _set_type(self, component_type):
2929
def _add_props(self, props: dict, append=False):
3030
for property_key, property_value in props.items():
3131
if append:
32+
if self.json['props'].get(property_key) is None:
33+
self.json['props'][property_key] = []
3234
self.json['props'][property_key].append(property_value)
3335
elif isinstance(property_value, dict) and len(property_value):
3436
for key, value in property_value.items():

0 commit comments

Comments
 (0)