Use a default parameter.

This commit is contained in:
joshaber
2016-01-04 13:14:02 -05:00
parent e3451090ed
commit 5a7b4562e1

View File

@@ -29,7 +29,7 @@ export default class GitRepositoryAsync {
return 'GitRepositoryAsync.destroyed'
}
constructor (_path, options) {
constructor (_path, options = {}) {
this.repo = null
this.emitter = new Emitter()
this.subscriptions = new CompositeDisposable()
@@ -40,8 +40,6 @@ export default class GitRepositoryAsync {
this._refreshingCount = 0
options = options || {}
let {refreshOnWindowFocus = true} = options
if (refreshOnWindowFocus) {
const onWindowFocus = () => this.refreshStatus()