Default status to 0 if undefined

This keeps the status-changed event from triggering
the first time the status is requested as it goes
from undefined to 0 which should be treated as no
change.
This commit is contained in:
Kevin Sawicki
2013-03-01 18:42:41 -08:00
parent 1be0b817de
commit c14aa3b86f
2 changed files with 7 additions and 9 deletions

View File

@@ -70,8 +70,8 @@ class Git
@getRepo().getHead() ? ''
getPathStatus: (path) ->
currentPathStatus = @statuses[path]
pathStatus = @getRepo().getStatus(@relativize(path))
currentPathStatus = @statuses[path] ? 0
pathStatus = @getRepo().getStatus(@relativize(path)) ? 0
if pathStatus > 0
@statuses[path] = pathStatus
else