Skip to content

Commit

Permalink
Fix an edge case where remotref node is gone
Browse files Browse the repository at this point in the history
  • Loading branch information
jung-kim committed Mar 30, 2017
1 parent 342bef1 commit f57ba20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/graph/git-graph-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ GraphActions.Reset = function(graph, node) {
var context = self.graph.currentActionContext();
if (context.node() != self.node) return false;
var remoteRef = context.getRemoteRef(self.graph.currentRemote());
return remoteRef &&
return remoteRef && remoteRef.node() &&
context && context.node() &&
remoteRef.node() != context.node() &&
remoteRef.node().date < context.node().date;
});
Expand Down

0 comments on commit f57ba20

Please sign in to comment.