Test for undefinedness instead of 0.

This commit is contained in:
joshaber
2016-04-27 12:50:27 -04:00
parent a279db5568
commit 69e97204d5

View File

@@ -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.
#