Handle case where IOS can send active child -1
Summary: Sometimes iOS can return active child -1, which is causing some crashes on desktop, (see the tasks) this is a client bug but the desktop shouldnt crash none the less seems to occur only sometimes only on fboios Reviewed By: lblasa Differential Revision: D46894387 fbshipit-source-id: f9c34fe8fb32691486455224f82bed9c3dce6cef
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9a01411d2c
commit
5e5b56b684
@@ -194,7 +194,11 @@ function Visualization2DNode({
|
|||||||
|
|
||||||
//if there is an active child don't draw the other children
|
//if there is an active child don't draw the other children
|
||||||
//this means we don't draw overlapping activities / tabs etc
|
//this means we don't draw overlapping activities / tabs etc
|
||||||
if (node.activeChildIdx && node.activeChildIdx < node.children.length) {
|
if (
|
||||||
|
node.activeChildIdx != null &&
|
||||||
|
node.activeChildIdx >= 0 &&
|
||||||
|
node.activeChildIdx < node.children.length
|
||||||
|
) {
|
||||||
nestedChildren = [node.children[node.activeChildIdx]];
|
nestedChildren = [node.children[node.activeChildIdx]];
|
||||||
} else {
|
} else {
|
||||||
nestedChildren = node.children;
|
nestedChildren = node.children;
|
||||||
|
|||||||
Reference in New Issue
Block a user