From c068deac2d446b0f1cdcc8f319b8fc54c4aaab72 Mon Sep 17 00:00:00 2001 From: ZHANG Qichuan Date: Mon, 22 Jun 2020 02:13:02 -0700 Subject: [PATCH] Fix the network plugin crashes when Add Route button is pressed (#1281) Summary: Changelog: Fix Network Mock Dialog crashes when 'Add Route' button is pressed https://github.com/facebook/flipper/issues/1280 Pull Request resolved: https://github.com/facebook/flipper/pull/1281 Reviewed By: cekkaewnumchai Differential Revision: D22151908 Pulled By: passy fbshipit-source-id: cafd2b53d76cd9ea213f8be09866222a6330d043 --- desktop/plugins/network/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/plugins/network/index.tsx b/desktop/plugins/network/index.tsx index 6ac60a35c..bff84ed73 100644 --- a/desktop/plugins/network/index.tsx +++ b/desktop/plugins/network/index.tsx @@ -216,7 +216,7 @@ export default class extends FlipperPlugin { routes: routes, isMockResponseSupported: result, showMockResponseDialog: false, - nextRouteId: routes.length, + nextRouteId: Object.keys(routes).length, }); });