Dont allow focusing leaf node

Summary: This mode is useless for leaves

Reviewed By: aigoncharov

Differential Revision: D47949539

fbshipit-source-id: 7f3ae6652ad696e9f550fe5b8f2298a1a3eff329
This commit is contained in:
Luke De Feo
2023-08-01 10:32:29 -07:00
committed by Facebook GitHub Bot
parent 9932d28b2f
commit af7c1c7e74
3 changed files with 24 additions and 6 deletions

View File

@@ -0,0 +1,15 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import {ClientNode, Id} from '../ClientTypes';
export function getNode(id: Id | undefined, nodes: Map<Id, ClientNode>) {
//map just returns undefined when you pass null or undefined as a key
return nodes.get(id!);
}