Skip to content

Commit f16e945

Browse files
authored
Merge 299ed28 into a10c18f
2 parents a10c18f + 299ed28 commit f16e945

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/dirty-rings-cry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/functions': patch
3+
---
4+
5+
Fixes a bug introduced in #3782 that causes callable functions to throw an error in browser extensions.

packages-exp/functions-exp/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ import { name, version } from '../package.json';
2121

2222
export * from './api';
2323

24-
registerFunctions(fetch);
24+
registerFunctions(fetch.bind(self));
2525
registerVersion(name, version);

packages/functions/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { registerFunctions } from './src/config';
2121

2222
import { name, version } from './package.json';
2323

24-
registerFunctions(firebase as _FirebaseNamespace, fetch);
24+
registerFunctions(firebase as _FirebaseNamespace, fetch.bind(self));
2525
firebase.registerVersion(name, version);
2626

2727
declare module '@firebase/app-types' {

0 commit comments

Comments
 (0)