From 69e97204d51ec412f0b81acf1eb89369aed08a15 Mon Sep 17 00:00:00 2001 From: joshaber Date: Wed, 27 Apr 2016 12:50:27 -0400 Subject: [PATCH] Test for undefinedness instead of 0. --- src/git-repository.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/git-repository.coffee b/src/git-repository.coffee index a04124b78..cea000efc 100644 --- a/src/git-repository.coffee +++ b/src/git-repository.coffee @@ -369,7 +369,10 @@ class GitRepository @getCachedRelativePathStatus(relativePath) getCachedRelativePathStatus: (relativePath) -> - @statusesByPath[relativePath] ? @async.getCachedPathStatuses()[relativePath] + cachedStatus = @statusesByPath[relativePath] + return cachedStatus if cachedStatus? + + @async.getCachedPathStatuses()[relativePath] # Public: Returns true if the given status indicates modification. #