Skip to content

Commit 68123c1

Browse files
authored
handle events with multiple spec inside of component doc generation (#1268)
1 parent ac1b985 commit 68123c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pcweb/pages/docs/component.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from types import UnionType
77
from typing import (
88
Any,
9+
Sequence,
910
Type,
1011
Literal,
1112
_GenericAlias,
@@ -949,6 +950,8 @@ def generate_props(src, component, comp):
949950
def same_trigger(t1, t2):
950951
if t1 is None or t2 is None:
951952
return False
953+
t1 = t1 if not isinstance(t1, Sequence) else t1[0]
954+
t2 = t2 if not isinstance(t2, Sequence) else t2[0]
952955
args1 = inspect.getfullargspec(t1).args
953956
args2 = inspect.getfullargspec(t2).args
954957
return args1 == args2

0 commit comments

Comments
 (0)