Skip to content
This repository was archived by the owner on Jun 13, 2020. It is now read-only.

Commit e5a9956

Browse files
committed
Merge pull request #15 from tonymilne/fix-globals
Fix leaky global variables.
2 parents 981f07e + 183b617 commit e5a9956

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ module.exports = function(options) {
2424
}
2525

2626
var version = packagejson.version;
27-
this.client_id = options.client_id;
28-
this.client_secret = options.client_secret;
29-
this.access_token = options.access_token;
27+
var client_id = options.client_id;
28+
var client_secret = options.client_secret;
29+
var access_token = options.access_token;
3030

3131
/**
3232
* Serializes an object into a parameter string
@@ -241,12 +241,12 @@ module.exports = function(options) {
241241
return {
242242

243243
get access_token() {
244-
return self.access_token;
244+
return access_token;
245245
},
246246

247247
set access_token(token) {
248248
if(typeof(token) === 'string') {
249-
self.access_token = token;
249+
access_token = token;
250250
}
251251
},
252252

0 commit comments

Comments
 (0)