Fix flow errors (#502)
Summary: We had a brief moment without Flow coverage, where this must have snuck in. Not sure if there's a better type for `node` given the current structure, but the rest should be obvious. Pull Request resolved: https://github.com/facebook/flipper/pull/502 Test Plan: flow Reviewed By: jknoxville Differential Revision: D16533248 Pulled By: passy fbshipit-source-id: 51e493208050e4af531e161fb49eda77fdf2494e
This commit is contained in:
committed by
Facebook Github Bot
parent
4372fccacc
commit
2dd580f24a
@@ -62,11 +62,13 @@ type TreeData = Array<{
|
||||
removed?: boolean,
|
||||
updated?: boolean,
|
||||
unchanged?: boolean,
|
||||
isSection?: boolean,
|
||||
isDataModel?: boolean,
|
||||
}>;
|
||||
|
||||
type Props = {
|
||||
data: TreeData | SectionComponentHierarchy,
|
||||
nodeClickHandler?: (node, evt) => void,
|
||||
nodeClickHandler?: (node: any, evt: InputEvent) => void,
|
||||
};
|
||||
|
||||
type State = {
|
||||
|
||||
@@ -170,7 +170,7 @@ export default class extends FlipperPlugin<State, *, PersistedState> {
|
||||
});
|
||||
};
|
||||
|
||||
onNodeClicked = (targetNode, evt) => {
|
||||
onNodeClicked = (targetNode: any, evt: InputEvent) => {
|
||||
if (targetNode.attributes.isSection) {
|
||||
this.setState({
|
||||
selectedTreeNode: null,
|
||||
@@ -179,7 +179,6 @@ export default class extends FlipperPlugin<State, *, PersistedState> {
|
||||
}
|
||||
|
||||
let dataModel;
|
||||
const selectedTreeNode = {};
|
||||
// Not all models can be parsed.
|
||||
if (targetNode.attributes.isDataModel) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user