From 7495a905dde9386341630ba2214fe3efd5296e5d Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 21 Jan 2014 15:16:36 +0100 Subject: [PATCH] Fix thread expanding. Apparently an xhr's reponse is read-only. --- src/Miscellaneous/ExpandThread.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Miscellaneous/ExpandThread.coffee b/src/Miscellaneous/ExpandThread.coffee index 6401a400c..d7c6a6d59 100644 --- a/src/Miscellaneous/ExpandThread.coffee +++ b/src/Miscellaneous/ExpandThread.coffee @@ -74,12 +74,13 @@ ExpandThread = a.textContent = "Error #{req.statusText} (#{req.status})" return - Build.spoilerRange[thread.board] = req.response.posts.shift().custom_spoiler + Build.spoilerRange[thread.board] = req.response.posts[0].custom_spoiler posts = [] postsRoot = [] filesCount = 0 for postData in req.response.posts + continue if postData.no is thread.ID if post = thread.posts[postData.no] filesCount++ if 'file' of post postsRoot.push post.nodes.root