Skip to content

Commit e5d703d

Browse files
committed
Fix null test for background[method] in test envs
1 parent 6f04c99 commit e5d703d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/store/background-connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function submitRequestToBackground<R>(
3030
// tests don't always set the `background` property for convenience, as
3131
// the return values for various RPC calls aren't always used. In production
3232
// builds, this will not happen, and even if it did MM wouldn't work.
33-
if (!background) {
33+
if (typeof background?.[method] !== 'function') {
3434
console.warn(NO_BACKGROUND_CONNECTION_MESSAGE);
3535
return Promise.resolve() as Promise<R>;
3636
}

0 commit comments

Comments
 (0)