Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug with CORS options for an array of one item for `onCall` (#1563)
2 changes: 1 addition & 1 deletion src/v2/providers/https.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export function onCall<T = any, Return = any | Promise<any>>(
// on the origin header of the request. If there is only one element in the
// array, this is unnecessary.
if (Array.isArray(origin) && origin.length === 1) {
origin = origin[1];
origin = origin[0];
}

// onCallHandler sniffs the function length to determine which API to present.
Expand Down
Loading