mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 11:18:14 +08:00
fix: Avatar.onError() event is triggered twice (#24506)
This commit is contained in:
parent
84df944aaf
commit
f7c34de3ca
@ -197,6 +197,11 @@ export default class Avatar extends React.Component<AvatarProps, AvatarState> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The event is triggered twice from bubbling up the DOM tree.
|
||||||
|
// see https://codesandbox.io/s/kind-snow-9lidz
|
||||||
|
delete others.onError;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
{...others}
|
{...others}
|
||||||
|
Loading…
Reference in New Issue
Block a user