mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
safer bind
This commit is contained in:
@@ -18,7 +18,7 @@ module.exports = function(){
|
||||
.get(this.data.url)
|
||||
.then(function(){return browser;})
|
||||
.then(getJSReport)
|
||||
.then(this.data.onComplete.bind(browser), this.data.onError.bind(browser))
|
||||
.then(this.data.onComplete && this.data.onComplete.bind(browser), this.data.onError && this.data.onError.bind(browser))
|
||||
.fin(browser.quit.bind(browser))
|
||||
.done(taskSucceeded.bind(null,true), taskSucceeded.bind(null,false))
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user