Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit fe380f4

Browse files
committed
Fix calling the main function with a single argument
1 parent 3d40ef4 commit fe380f4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/index.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class NetlifyAPI {
1919
userAgent: 'netlify/js-client',
2020
scheme: dfn.schemes[0],
2121
host: dfn.host,
22-
pathPrefix: dfn.basePath
22+
pathPrefix: dfn.basePath,
23+
accessToken
2324
},
2425
opts
2526
)
@@ -34,11 +35,7 @@ class NetlifyAPI {
3435
this.host = opts.host
3536
this.pathPrefix = opts.pathPrefix
3637
this.globalParams = Object.assign({}, opts.globalParams)
37-
38-
if (accessToken) {
39-
debug('Setting access token')
40-
this.accessToken = accessToken
41-
}
38+
this.accessToken = opts.accessToken
4239
}
4340

4441
get accessToken() {

0 commit comments

Comments
 (0)