Skip to content

Functions: Bind passed fetch function #3853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/dirty-rings-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@firebase/functions-exp': patch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove @firebase/functions-exp. Exp packages should not be included in changeset.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

'@firebase/functions': patch
---

Fixes a bug introduced in #3782 that causes callable functions to throw an error in browser extensions.
2 changes: 1 addition & 1 deletion packages-exp/functions-exp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ import { name, version } from '../package.json';

export * from './api';

registerFunctions(fetch);
registerFunctions(fetch.bind(self));
registerVersion(name, version);
2 changes: 1 addition & 1 deletion packages/functions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { registerFunctions } from './src/config';

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

registerFunctions(firebase as _FirebaseNamespace, fetch);
registerFunctions(firebase as _FirebaseNamespace, fetch.bind(self));
firebase.registerVersion(name, version);

declare module '@firebase/app-types' {
Expand Down