Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mondaychen committed Jun 6, 2022
1 parent 276fc88 commit b7d225a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 3 additions & 5 deletions packages/react-devtools-shared/src/backend/legacy/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function attach(

let getInternalIDForNative: GetFiberIDForNative = ((null: any): GetFiberIDForNative);
let findNativeNodeForInternalID: (id: number) => ?NativeType;
let getFiberForNative: GetFiberForNative = (node) => {
let getFiberForNative: GetFiberForNative = node => {
// Not implemented.
return null;
};
Expand All @@ -165,10 +165,8 @@ export function attach(
const internalInstance = idToInternalInstanceMap.get(id);
return renderer.ComponentTree.getNodeFromInstance(internalInstance);
};
getFiberForNative = (node) => {
return renderer.ComponentTree.getClosestInstanceFromNode(
node,
);
getFiberForNative = node => {
return renderer.ComponentTree.getClosestInstanceFromNode(node);
};
} else if (renderer.Mount.getID && renderer.Mount.getNode) {
getInternalIDForNative = (node, findNearestUnfilteredAncestor) => {
Expand Down
4 changes: 1 addition & 3 deletions packages/react-devtools-shared/src/backend/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ export type GetFiberIDForNative = (
component: NativeType,
findNearestUnfilteredAncestor?: boolean,
) => number | null;
export type GetFiberForNative = (
component: NativeType,
) => Fiber | null;
export type GetFiberForNative = (component: NativeType) => Fiber | null;
export type FindNativeNodesForFiberID = (id: number) => ?Array<NativeType>;

export type ReactProviderType<T> = {
Expand Down

0 comments on commit b7d225a

Please sign in to comment.