From 9028c7532dd0fc343cc1b02e807c6e338760041d Mon Sep 17 00:00:00 2001 From: muji Date: Sun, 17 Apr 2016 12:28:22 +0800 Subject: [PATCH] Guard on grandparent assignment. --- lib/man.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/man.js b/lib/man.js index 8fbe8fb..156083d 100644 --- a/lib/man.js +++ b/lib/man.js @@ -117,7 +117,7 @@ function text(node) { } var p = node.parent - , grandparent = p.parent + , grandparent = p ? p.parent : null , dest = ''; // NOTE: this captures link parents when the hierarchy is: