@taskcluster/client 105.0.0 → 105.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/client.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taskcluster/client",
3
- "version": "105.0.0",
3
+ "version": "105.1.0",
4
4
  "author": "Jonas Finnemann Jensen <jopsen@gmail.com>",
5
5
  "description": "Client for interfacing taskcluster components",
6
6
  "license": "MPL-2.0",
package/src/client.js CHANGED
@@ -247,6 +247,10 @@ export const createClient = (reference, name) => {
247
247
  throw new Error('options.randomizationFactor must be between 0 and 1!');
248
248
  }
249
249
 
250
+ if (this._options.authorizedScopes != null && !Array.isArray(this._options.authorizedScopes)) {
251
+ throw new Error('options.authorizedScopes must be an array of scopes');
252
+ }
253
+
250
254
  if (this._options.agent) {
251
255
  // We have explicit options for new agent create one...
252
256
  this._httpAgent = {
@@ -286,7 +290,7 @@ export const createClient = (reference, name) => {
286
290
 
287
291
  // If set of authorized scopes is provided, we'll restrict the request
288
292
  // to only use these scopes
289
- if (Array.isArray(this._options.authorizedScopes)) {
293
+ if (this._options.authorizedScopes) {
290
294
  ext.authorizedScopes = this._options.authorizedScopes;
291
295
  }
292
296