Fix comment being missing when clone is made when comment is in catalog thread.
Fixes bug from e45eaea49f775bcb59727e9657e718ac3dcd5421.
This commit is contained in:
parent
9b33834bfc
commit
ecec1211ab
@ -7,10 +7,14 @@ Post.Clone = class extends Post
|
||||
@[key] = @origin[key]
|
||||
|
||||
{nodes} = @origin
|
||||
root = if contractThumb
|
||||
@cloneWithoutVideo nodes.root
|
||||
cloneNode = if contractThumb
|
||||
@cloneWithoutVideo
|
||||
else
|
||||
nodes.root.cloneNode true
|
||||
(node) -> node.cloneNode true
|
||||
root = cloneNode nodes.root
|
||||
# Handle case where comment has been moved into catalog thread
|
||||
if nodes.comment.parentNode isnt nodes.post
|
||||
$.add $('.post', root), cloneNode(nodes.comment)
|
||||
Post.Clone.prefix or= 0
|
||||
for node in [root, $$('[id]', root)...]
|
||||
node.id = Post.Clone.prefix + node.id
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user