This repository was archived by the owner on Jul 13, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,14 +109,11 @@ export class DataLabelingServiceClient {
109109 // const showcaseClient = new showcaseClient({ projectId, customConfig });
110110 opts . clientConfig = opts . clientConfig || { } ;
111111
112- const isBrowser = typeof window !== 'undefined' ;
113- if ( isBrowser ) {
114- opts . fallback = true ;
115- }
116- // If we are in browser, we are already using fallback because of the
117- // "browser" field in package.json.
118- // But if we were explicitly requested to use fallback, let's do it now.
119- this . _gaxModule = ! isBrowser && opts . fallback ? gax . fallback : gax ;
112+ // If we're running in browser, it's OK to omit `fallback` since
113+ // google-gax has `browser` field in its `package.json`.
114+ // For Electron (which does not respect `browser` field),
115+ // pass `{fallback: true}` to the DataLabelingServiceClient constructor.
116+ this . _gaxModule = opts . fallback ? gax . fallback : gax ;
120117
121118 // Create a `gaxGrpc` object, with any grpc-specific options
122119 // sent to the client.
Original file line number Diff line number Diff line change 44 "git": {
55 "name": ".",
66 "remote": "https://github.com/googleapis/nodejs-datalabeling.git",
7- "sha": "c221d20ca6db52d9c42940bd37efba8e04130fe2 "
7+ "sha": "1d96183093753483a60989c0e688e23bfca3879f "
88 }
99 },
1010 {
You can’t perform that action at this time.
0 commit comments