That was just a little too much going on in one line

This commit is contained in:
Zixaphir 2014-01-09 12:03:23 -07:00
parent a7a7df6b7b
commit de5d903e46
3 changed files with 17 additions and 5 deletions

View File

@ -9790,9 +9790,14 @@
record = _ref[boardID];
for (type in record) {
id = record[type];
if ((archive = archives[id]) && __indexOf.call((type === 'file' ? archive['file'] : archive['boards']), boardID) >= 0) {
o[type][boardID] = archive.data;
if (!((archive = archives[id]))) {
continue;
}
boards = type === 'file' ? archive.file : archive.boards;
if (__indexOf.call(boards, boardID) < 0) {
continue;
}
o[type][boardID] = archive.data;
}
}
for (name in archives) {

View File

@ -9779,9 +9779,14 @@
record = _ref[boardID];
for (type in record) {
id = record[type];
if ((archive = archives[id]) && __indexOf.call((type === 'file' ? archive['file'] : archive['boards']), boardID) >= 0) {
o[type][boardID] = archive.data;
if (!((archive = archives[id]))) {
continue;
}
boards = type === 'file' ? archive.file : archive.boards;
if (__indexOf.call(boards, boardID) < 0) {
continue;
}
o[type][boardID] = archive.data;
}
}
for (name in archives) {

View File

@ -9,7 +9,9 @@ Redirect =
{archives} = Redirect
for boardID, record of Conf['selectedArchives']
for type, id of record when (archive = archives[id]) and boardID in (if type is 'file' then archive['file'] else archive['boards'])
for type, id of record when (archive = archives[id])
boards = if type is 'file' then archive.file else archive.boards
continue unless boardID in boards
o[type][boardID] = archive.data
for name, {data, boards, files} of archives