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
@@ -30,7 +30,7 @@ export type CrashLog = {
|
||||
|
||||
export function devicePlugin(client: DevicePluginClient) {
|
||||
let notificationID = -1;
|
||||
let watcher: FSWatcher | undefined;
|
||||
let watcher: Promise<FSWatcher | undefined>;
|
||||
|
||||
const crashes = createState<Crash[]>([], {persist: 'crashes'});
|
||||
const selectedCrash = createState<string | undefined>();
|
||||
@@ -70,7 +70,14 @@ export function devicePlugin(client: DevicePluginClient) {
|
||||
}
|
||||
|
||||
client.onDestroy(() => {
|
||||
watcher?.close();
|
||||
watcher
|
||||
.then((watcher) => watcher?.close())
|
||||
.catch((e) =>
|
||||
console.error(
|
||||
'[crash_reporter] FSWatcher failed resoving on destroy:',
|
||||
e,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user