@taskcluster/client-web 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-web",
3
- "version": "105.0.0",
3
+ "version": "105.1.0",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "exports": "./src/index.js",
package/src/Client.js CHANGED
@@ -32,6 +32,10 @@ export default class Client {
32
32
  throw new Error('options.randomizationFactor must be between 0 and 1');
33
33
  }
34
34
 
35
+ if (this.options.authorizedScopes != null && !Array.isArray(this.options.authorizedScopes)) {
36
+ throw new Error('options.authorizedScopes must be an array of scopes');
37
+ }
38
+
35
39
  if (this.options.accessToken) {
36
40
  throw new Error('options.accessToken is no longer supported; use options.credentials');
37
41
  }
@@ -105,7 +109,7 @@ export default class Client {
105
109
 
106
110
  // If set of authorized scopes is provided, we'll restrict the request
107
111
  // to only use these scopes
108
- if (Array.isArray(authorizedScopes)) {
112
+ if (authorizedScopes) {
109
113
  extra.authorizedScopes = authorizedScopes;
110
114
  }
111
115