Fix duplicate data property in object literal not allowed in strict mode.
This commit is contained in:
parent
e5db696b87
commit
03a8435a94
@ -1,5 +1,6 @@
|
|||||||
Redirect =
|
Redirect =
|
||||||
archives: `<%= JSON.stringify(grunt.file.readJSON('json/archives.json')) %>`
|
archives: `<%= JSON.stringify(grunt.file.readJSON('json/archives.json')) %>`
|
||||||
|
data:
|
||||||
thread: {}
|
thread: {}
|
||||||
post: {}
|
post: {}
|
||||||
file: {}
|
file: {}
|
||||||
@ -13,15 +14,15 @@ Redirect =
|
|||||||
archive.files
|
archive.files
|
||||||
else
|
else
|
||||||
archive.boards
|
archive.boards
|
||||||
Redirect[type][boardID] = archive if boardID in arr
|
Redirect.data[type][boardID] = archive if boardID in arr
|
||||||
for archive in Conf['archives']
|
for archive in Conf['archives']
|
||||||
for boardID in archive.boards
|
for boardID in archive.boards
|
||||||
unless boardID of Redirect.thread
|
unless boardID of Redirect.data.thread
|
||||||
Redirect.thread[boardID] = archive
|
Redirect.data.thread[boardID] = archive
|
||||||
unless boardID of Redirect.post or archive.software isnt 'foolfuuka'
|
unless boardID of Redirect.data.post or archive.software isnt 'foolfuuka'
|
||||||
Redirect.post[boardID] = archive
|
Redirect.data.post[boardID] = archive
|
||||||
unless boardID of Redirect.file or boardID not in archive.files
|
unless boardID of Redirect.data.file or boardID not in archive.files
|
||||||
Redirect.file[boardID] = archive
|
Redirect.data.file[boardID] = archive
|
||||||
|
|
||||||
Redirect.update()
|
Redirect.update()
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ Redirect =
|
|||||||
cb? now
|
cb? now
|
||||||
|
|
||||||
to: (dest, data) ->
|
to: (dest, data) ->
|
||||||
archive = (if dest is 'search' then Redirect.thread else Redirect[dest])[data.boardID]
|
archive = (if dest is 'search' then Redirect.data.thread else Redirect.data[dest])[data.boardID]
|
||||||
return '' unless archive
|
return '' unless archive
|
||||||
Redirect[dest] archive, data
|
Redirect[dest] archive, data
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user