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
This commit is contained in:
ZHANG Qichuan
2020-06-22 02:13:02 -07:00
committed by Facebook GitHub Bot
parent 4ac9dc9eda
commit c068deac2d

View File

@@ -216,7 +216,7 @@ export default class extends FlipperPlugin<State, any, PersistedState> {
routes: routes, routes: routes,
isMockResponseSupported: result, isMockResponseSupported: result,
showMockResponseDialog: false, showMockResponseDialog: false,
nextRouteId: routes.length, nextRouteId: Object.keys(routes).length,
}); });
}); });