Fix Flipper lints #16
Summary: Larger list of fixes. Adding another package to the flipper export is a bit nasty but it unblocks us for now and centralises `remote` access which seems like a win for FAAS. Reviewed By: mweststrate Differential Revision: D30785421 fbshipit-source-id: 931297e8566b5d8a213b69ae87d0cda7648b3ed4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
262cd6105b
commit
47099cfd31
@@ -236,20 +236,23 @@ export function plugin(client: PluginClient<Events, Methods>) {
|
||||
}
|
||||
|
||||
function init() {
|
||||
supportsMocks(client.device).then((result) => {
|
||||
const newRoutes = JSON.parse(
|
||||
localStorage.getItem(LOCALSTORAGE_MOCK_ROUTE_LIST_KEY + client.appId) ||
|
||||
'{}',
|
||||
);
|
||||
batch(() => {
|
||||
routes.set(newRoutes);
|
||||
isMockResponseSupported.set(result);
|
||||
showMockResponseDialog.set(false);
|
||||
nextRouteId.set(Object.keys(routes.get()).length);
|
||||
});
|
||||
supportsMocks(client.device)
|
||||
.then((result) => {
|
||||
const newRoutes = JSON.parse(
|
||||
localStorage.getItem(
|
||||
LOCALSTORAGE_MOCK_ROUTE_LIST_KEY + client.appId,
|
||||
) || '{}',
|
||||
);
|
||||
batch(() => {
|
||||
routes.set(newRoutes);
|
||||
isMockResponseSupported.set(result);
|
||||
showMockResponseDialog.set(false);
|
||||
nextRouteId.set(Object.keys(routes.get()).length);
|
||||
});
|
||||
|
||||
informClientMockChange(routes.get());
|
||||
});
|
||||
informClientMockChange(routes.get());
|
||||
})
|
||||
.catch((e) => console.error('[network] Failed to init mocks:', e));
|
||||
|
||||
// declare new variable to be called inside the interface
|
||||
networkRouteManager.set(
|
||||
|
||||
Reference in New Issue
Block a user