File tree 2 files changed +6
-9
lines changed
packages/google-cloud-phishingprotection
2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,11 @@ export class PhishingProtectionServiceV1Beta1Client {
100
100
// const showcaseClient = new showcaseClient({ projectId, customConfig });
101
101
opts . clientConfig = opts . clientConfig || { } ;
102
102
103
- const isBrowser = typeof window !== 'undefined' ;
104
- if ( isBrowser ) {
105
- opts . fallback = true ;
106
- }
107
- // If we are in browser, we are already using fallback because of the
108
- // "browser" field in package.json.
109
- // But if we were explicitly requested to use fallback, let's do it now.
110
- this . _gaxModule = ! isBrowser && opts . fallback ? gax . fallback : gax ;
103
+ // If we're running in browser, it's OK to omit `fallback` since
104
+ // google-gax has `browser` field in its `package.json`.
105
+ // For Electron (which does not respect `browser` field),
106
+ // pass `{fallback: true}` to the PhishingProtectionServiceV1Beta1Client constructor.
107
+ this . _gaxModule = opts . fallback ? gax . fallback : gax ;
111
108
112
109
// Create a `gaxGrpc` object, with any grpc-specific options
113
110
// sent to the client.
Original file line number Diff line number Diff line change 4
4
"git": {
5
5
"name": ".",
6
6
"remote": "https://github.com/googleapis/nodejs-phishing-protection.git",
7
- "sha": "f30f164139c18728e33a997d16c900867831389f "
7
+ "sha": "8dcefc34ba6b8b7f6e55166c6ba58209a1301375 "
8
8
}
9
9
},
10
10
{
You can’t perform that action at this time.
0 commit comments