Always give integers for thread IDs.
This commit is contained in:
parent
51358e328a
commit
6213853f67
@ -185,7 +185,7 @@ Get =
|
||||
# quotes
|
||||
.replace /((>){2}(>\/[a-z\d]+\/)?\d+)/g, '<span class=deadlink>$1</span>'
|
||||
|
||||
threadID = data.thread_num
|
||||
threadID = +data.thread_num
|
||||
o =
|
||||
# id
|
||||
postID: "#{postID}"
|
||||
|
||||
@ -182,7 +182,7 @@ Main =
|
||||
posts = []
|
||||
|
||||
for threadRoot in $$ '.board > .thread', board
|
||||
thread = new Thread threadRoot.id[1..], g.BOARD
|
||||
thread = new Thread +threadRoot.id[1..], g.BOARD
|
||||
threads.push thread
|
||||
for postRoot in $$ '.thread > .postContainer', threadRoot
|
||||
try
|
||||
|
||||
@ -2,8 +2,7 @@ class Thread
|
||||
callbacks: []
|
||||
toString: -> @ID
|
||||
|
||||
constructor: (ID, @board) ->
|
||||
@ID = +ID
|
||||
constructor: (@ID, @board) ->
|
||||
@fullID = "#{@board}.#{@ID}"
|
||||
@posts = {}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user