mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[Flare] event component displayName is now mandatory (#15717)
This commit is contained in:
@@ -137,7 +137,7 @@ export type ReactEventComponentInstance = {|
|
||||
|
||||
export type ReactEventComponent = {|
|
||||
$$typeof: Symbol | number,
|
||||
displayName?: string,
|
||||
displayName: string,
|
||||
props: null | Object,
|
||||
responder: ReactEventResponder,
|
||||
|};
|
||||
|
||||
@@ -95,10 +95,7 @@ function getComponentName(type: mixed): string | null {
|
||||
case REACT_EVENT_COMPONENT_TYPE: {
|
||||
if (enableEventAPI) {
|
||||
const eventComponent = ((type: any): ReactEventComponent);
|
||||
const displayName = eventComponent.displayName;
|
||||
if (displayName !== undefined) {
|
||||
return displayName;
|
||||
}
|
||||
return eventComponent.displayName;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user