Fix crash

This commit is contained in:
Mayhem 2014-01-20 10:02:19 +01:00
parent fdd6a20c87
commit a44164c58d

View File

@ -5,7 +5,7 @@ Redirect =
@update() @update()
selectArchives: -> selectArchives: ->
data = Redirect.data =
thread: {} thread: {}
post: {} post: {}
file: {} file: {}
@ -18,17 +18,17 @@ Redirect =
archive.files archive.files
else else
archive.boards archive.boards
data[type][boardID] = archive if boardID in arr Redirect.data[type][boardID] = archive if boardID in arr
break break
for archive in Conf['archives'] for archive in Conf['archives']
for boardID in archive.boards for boardID in archive.boards
unless boardID of data.thread unless boardID of Redirect.data.thread
data.thread[boardID] = archive Redirect.data.thread[boardID] = archive
unless boardID of data.post or archive.software isnt 'foolfuuka' unless boardID of Redirect.data.post or archive.software isnt 'foolfuuka'
data.post[boardID] = archive Redirect.data.post[boardID] = archive
unless boardID of data.file or boardID not in archive.files unless boardID of Redirect.data.file or boardID not in archive.files
data.file[boardID] = archive Redirect.data.file[boardID] = archive
Redirect.data = data return
update: (cb) -> update: (cb) ->
$.get 'lastarchivecheck', 0, ({lastarchivecheck}) -> $.get 'lastarchivecheck', 0, ({lastarchivecheck}) ->
now = Date.now() now = Date.now()