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 @
|
ExpandThread.toggle Get.threadFromNode @
|
||||||
|
|
||||||
toggle: (thread) ->
|
toggle: (thread) ->
|
||||||
threadRoot = thread.nodes.root
|
return if not (thread.nodes.root and (a = $ '.summary', thread.nodes.root))
|
||||||
return if not (a = $ '.summary', threadRoot)
|
|
||||||
if thread.ID of ExpandThread.statuses
|
if thread.ID of ExpandThread.statuses
|
||||||
ExpandThread.contract thread, a, threadRoot
|
ExpandThread.contract thread, a, thread.nodes.root
|
||||||
else
|
else
|
||||||
ExpandThread.expand thread, a
|
ExpandThread.expand thread, a
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user