From 46d59fdda10f65b5647e935c571e3696ecbe5578 Mon Sep 17 00:00:00 2001 From: joshaber Date: Thu, 10 Dec 2015 10:34:49 -0500 Subject: [PATCH] Fix usage when we're given no options. --- src/git-repository-async.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/git-repository-async.js b/src/git-repository-async.js index 42e53f105..c1d42bc41 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -34,7 +34,9 @@ export default class GitRepositoryAsync { this._refreshingCount = 0 - let {refreshOnWindowFocus} = options || true + options = options || {} + + let {refreshOnWindowFocus = true} = options if (refreshOnWindowFocus) { const onWindowFocus = () => this.refreshStatus() window.addEventListener('focus', onWindowFocus)