Fix bad types and npe
Summary: Framework events was added recently so no garentueed to always be on all clients. Should fix T145084769 Reviewed By: mweststrate Differential Revision: D44064430 fbshipit-source-id: 5dab14a7de5815a25cf8fe7bfa485a6a57d60071
This commit is contained in:
committed by
Facebook GitHub Bot
parent
134ce1f4cb
commit
fa2ea39405
@@ -56,7 +56,7 @@ export function plugin(client: PluginClient<Events>) {
|
|||||||
client.onMessage('init', (event) => {
|
client.onMessage('init', (event) => {
|
||||||
rootId.set(event.rootId);
|
rootId.set(event.rootId);
|
||||||
uiState.frameworkEventMonitoring.update((draft) => {
|
uiState.frameworkEventMonitoring.update((draft) => {
|
||||||
event.frameworkEventMetadata.forEach((frameworkEventMeta) => {
|
event.frameworkEventMetadata?.forEach((frameworkEventMeta) => {
|
||||||
draft.set(frameworkEventMeta.type, false);
|
draft.set(frameworkEventMeta.type, false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export type FrameworkEvent = {
|
|||||||
|
|
||||||
export type InitEvent = {
|
export type InitEvent = {
|
||||||
rootId: Id;
|
rootId: Id;
|
||||||
frameworkEventMetadata: FrameworkEventMetadata[];
|
frameworkEventMetadata?: FrameworkEventMetadata[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type PerfStatsEvent = {
|
export type PerfStatsEvent = {
|
||||||
|
|||||||
Reference in New Issue
Block a user