We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
background[method]
1 parent 6f04c99 commit e5d703dCopy full SHA for e5d703d
ui/store/background-connection.ts
@@ -30,7 +30,7 @@ export function submitRequestToBackground<R>(
30
// tests don't always set the `background` property for convenience, as
31
// the return values for various RPC calls aren't always used. In production
32
// builds, this will not happen, and even if it did MM wouldn't work.
33
- if (!background) {
+ if (typeof background?.[method] !== 'function') {
34
console.warn(NO_BACKGROUND_CONNECTION_MESSAGE);
35
return Promise.resolve() as Promise<R>;
36
}
0 commit comments