From 327df159cc2de3b545955083bd664127a7633377 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 25 Oct 2015 23:05:55 -0700 Subject: [PATCH] Fix quoting crashing when you have selected something not inside a post. --- src/General/Get.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/General/Get.coffee b/src/General/Get.coffee index 90f41bdd8..636d463e9 100755 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -12,6 +12,7 @@ Get = threadFromNode: (node) -> Get.threadFromRoot $.x 'ancestor::div[@class="thread"]', node postFromRoot: (root) -> + return null unless root? link = $ '.postNum > a[href*="#"]', root boardID = link.pathname.split(/\/+/)[1] postID = link.hash[2..]