From f57ba2054e8e73ff75030f14e82edbaf602064d4 Mon Sep 17 00:00:00 2001 From: codingtwinky Date: Wed, 29 Mar 2017 17:53:04 -0700 Subject: [PATCH] Fix an edge case where remotref node is gone --- components/graph/git-graph-actions.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/graph/git-graph-actions.js b/components/graph/git-graph-actions.js index 46dd22fbb..bb4ae0d19 100644 --- a/components/graph/git-graph-actions.js +++ b/components/graph/git-graph-actions.js @@ -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; });