diff --git a/src/v1beta/game_server_clusters_service_client.ts b/src/v1beta/game_server_clusters_service_client.ts index b21a329..b008cac 100644 --- a/src/v1beta/game_server_clusters_service_client.ts +++ b/src/v1beta/game_server_clusters_service_client.ts @@ -107,10 +107,9 @@ export class GameServerClustersServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - // eslint-disable-next-line no-undef const fallback = opts?.fallback ?? - (typeof window !== 'undefined' && typeof window.fetch !== 'undefined'); + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. diff --git a/src/v1beta/game_server_configs_service_client.ts b/src/v1beta/game_server_configs_service_client.ts index daaad4f..4ef08a7 100644 --- a/src/v1beta/game_server_configs_service_client.ts +++ b/src/v1beta/game_server_configs_service_client.ts @@ -106,10 +106,9 @@ export class GameServerConfigsServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - // eslint-disable-next-line no-undef const fallback = opts?.fallback ?? - (typeof window !== 'undefined' && typeof window.fetch !== 'undefined'); + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. diff --git a/src/v1beta/game_server_deployments_service_client.ts b/src/v1beta/game_server_deployments_service_client.ts index 729338e..5f98d7d 100644 --- a/src/v1beta/game_server_deployments_service_client.ts +++ b/src/v1beta/game_server_deployments_service_client.ts @@ -107,10 +107,9 @@ export class GameServerDeploymentsServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - // eslint-disable-next-line no-undef const fallback = opts?.fallback ?? - (typeof window !== 'undefined' && typeof window.fetch !== 'undefined'); + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. diff --git a/src/v1beta/realms_service_client.ts b/src/v1beta/realms_service_client.ts index 1e672e4..37ee480 100644 --- a/src/v1beta/realms_service_client.ts +++ b/src/v1beta/realms_service_client.ts @@ -106,10 +106,9 @@ export class RealmsServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - // eslint-disable-next-line no-undef const fallback = opts?.fallback ?? - (typeof window !== 'undefined' && typeof window.fetch !== 'undefined'); + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.