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]
|
@[key] = @origin[key]
|
||||||
|
|
||||||
{nodes} = @origin
|
{nodes} = @origin
|
||||||
root = if contractThumb
|
cloneNode = if contractThumb
|
||||||
@cloneWithoutVideo nodes.root
|
@cloneWithoutVideo
|
||||||
else
|
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
|
Post.Clone.prefix or= 0
|
||||||
for node in [root, $$('[id]', root)...]
|
for node in [root, $$('[id]', root)...]
|
||||||
node.id = Post.Clone.prefix + node.id
|
node.id = Post.Clone.prefix + node.id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user