Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
allow request to take session as an argument
Browse files Browse the repository at this point in the history
  • Loading branch information
diracdeltas committed Feb 1, 2018
1 parent e230476 commit fe64a2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ function initTor (ses, partition) {
} else {
// do tor stuff
}
})
}, ses)
})
}

Expand Down
5 changes: 3 additions & 2 deletions js/lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ const getDefaultSession = () => {
* Depends on there being a loaded browser window available.
* @param {Object|string} options - options object or URL to load
* @param {function.<Error, Object, string>} callback
* @param {Object=} session - muon session to use if not the default
*/
module.exports.request = (options, callback) => {
module.exports.request = (options, callback, session) => {
var params
var responseType = options.responseType || 'text'
var defaultSession = getDefaultSession()
var defaultSession = session || getDefaultSession()

if (!defaultSession) return callback(new Error('Request failed, no session available'))

Expand Down

0 comments on commit fe64a2a

Please sign in to comment.