Deal with thread.nodes.root not existing.
I don't think it's possible to trigger this case, but might as well make it more robust (and consistent).
This commit is contained in:
parent
f3e2cbb19e
commit
7205ee37b9
@ -34,10 +34,9 @@ ExpandThread =
|
||||
ExpandThread.toggle Get.threadFromNode @
|
||||
|
||||
toggle: (thread) ->
|
||||
threadRoot = thread.nodes.root
|
||||
return if not (a = $ '.summary', threadRoot)
|
||||
return if not (thread.nodes.root and (a = $ '.summary', thread.nodes.root))
|
||||
if thread.ID of ExpandThread.statuses
|
||||
ExpandThread.contract thread, a, threadRoot
|
||||
ExpandThread.contract thread, a, thread.nodes.root
|
||||
else
|
||||
ExpandThread.expand thread, a
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user