diff --git a/desktop/flipper-frontend-core/src/AbstractClient.tsx b/desktop/flipper-frontend-core/src/AbstractClient.tsx index ec410664f..48b6d5638 100644 --- a/desktop/flipper-frontend-core/src/AbstractClient.tsx +++ b/desktop/flipper-frontend-core/src/AbstractClient.tsx @@ -503,6 +503,9 @@ export default abstract class AbstractClient extends EventEmitter { } async supportsMethod(api: string, method: string): Promise { + if (!this.connected.get()) { + return false; + } const response = await this.rawCall<{ isSupported: boolean; }>('isMethodSupported', true, { diff --git a/desktop/flipper-plugin/src/plugin/Plugin.tsx b/desktop/flipper-plugin/src/plugin/Plugin.tsx index f9645b015..aa8aa4d44 100644 --- a/desktop/flipper-plugin/src/plugin/Plugin.tsx +++ b/desktop/flipper-plugin/src/plugin/Plugin.tsx @@ -207,7 +207,6 @@ export class SandyPluginInstance extends BasePluginInstance { this.events.on('unhandled-event', batched(cb)); }, supportsMethod: async (method) => { - this.assertConnected(); return await realClient.supportsMethod( this.definition.id, method as any,