File tree 3 files changed +11
-7
lines changed
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,15 @@ declare module '@firebase/component' {
39
39
40
40
const factory : InstanceFactory < 'functions-compat' > = (
41
41
container : ComponentContainer ,
42
- { instanceIdentifier : regionOrCustomDomain } : InstanceFactoryOptions
42
+ options ? : InstanceFactoryOptions
43
43
) => {
44
44
// Dependencies
45
45
const app = container . getProvider ( 'app-compat' ) . getImmediate ( ) ;
46
46
const functionsServiceExp = container
47
47
. getProvider ( 'functions-exp' )
48
48
. getImmediate ( {
49
- identifier : regionOrCustomDomain
49
+ // This value is used as regionOrCustomDomain
50
+ identifier : options ?. instanceIdentifier
50
51
} ) ;
51
52
52
53
return new FunctionsService ( app , functionsServiceExp ) ;
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ import {
21
21
Component ,
22
22
ComponentType ,
23
23
ComponentContainer ,
24
- InstanceFactory
24
+ InstanceFactory ,
25
+ InstanceFactoryOptions
25
26
} from '@firebase/component' ;
26
27
import { FUNCTIONS_TYPE } from './constants' ;
27
28
@@ -30,7 +31,7 @@ export const DEFAULT_REGION = 'us-central1';
30
31
export function registerFunctions ( fetchImpl : typeof fetch ) : void {
31
32
const factory : InstanceFactory < 'functions' > = (
32
33
container : ComponentContainer ,
33
- { instanceIdentifier : regionOrCustomDomain }
34
+ options ?: InstanceFactoryOptions
34
35
) => {
35
36
// Dependencies
36
37
const app = container . getProvider ( 'app-exp' ) . getImmediate ( ) ;
@@ -42,7 +43,8 @@ export function registerFunctions(fetchImpl: typeof fetch): void {
42
43
app ,
43
44
authProvider ,
44
45
messagingProvider ,
45
- regionOrCustomDomain ,
46
+ // regionOrCustomDomain
47
+ options ?. instanceIdentifier ,
46
48
fetchImpl
47
49
) ;
48
50
} ;
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export function registerFunctions(
40
40
41
41
function factory (
42
42
container : ComponentContainer ,
43
- { instanceIdentifier : regionOrCustomDomain } : InstanceFactoryOptions
43
+ options ? : InstanceFactoryOptions
44
44
) : Service {
45
45
// Dependencies
46
46
const app = container . getProvider ( 'app' ) . getImmediate ( ) ;
@@ -52,7 +52,8 @@ export function registerFunctions(
52
52
app ,
53
53
authProvider ,
54
54
messagingProvider ,
55
- regionOrCustomDomain ,
55
+ // regionOrCustomDomain
56
+ options ?. instanceIdentifier ,
56
57
fetchImpl
57
58
) ;
58
59
}
You can’t perform that action at this time.
0 commit comments