[Flare] event component displayName is now mandatory (#15717)

This commit is contained in:
Dominic Gannaway
2019-05-23 01:29:07 +01:00
committed by GitHub
parent d66c8f2d9d
commit b962adfc2b
2 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ export type ReactEventComponentInstance = {|
export type ReactEventComponent = {|
$$typeof: Symbol | number,
displayName?: string,
displayName: string,
props: null | Object,
responder: ReactEventResponder,
|};
+1 -4
View File
@@ -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;
}