Fix quoting crashing when you have selected something not inside a post.

This commit is contained in:
ccd0 2015-10-25 23:05:55 -07:00
parent cf0c72941e
commit 327df159cc

View File

@ -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..]