diff --git a/lib/index.js b/lib/index.js index 9060571..f388ec6 100644 --- a/lib/index.js +++ b/lib/index.js @@ -12,7 +12,7 @@ const baseUrl = 'https://www.instagram.com' class Instagram { constructor( - { username, password, cookieStore }, + { username, password, cookieStore } = {}, //Not really permenantly required since there is a `client.login(user, pass)` { language, proxy, requestOptions } = {} ) { this.credentials = { @@ -45,7 +45,7 @@ class Instagram { this.request = request.defaults(requestOptions) } - async login({ username, password } = {}, { _sharedData = true } = {}) { + async login({ username, password }, { _sharedData = true } = {}) { username = username || this.credentials.username password = password || this.credentials.password