Use a static array instead of a stray variable for DataBoard keys.
This commit is contained in:
parent
772e82aa60
commit
a972183286
@ -1,6 +1,6 @@
|
||||
DataBoards = ['hiddenThreads', 'hiddenPosts', 'lastReadPosts', 'yourPosts', 'watchedThreads']
|
||||
|
||||
class DataBoard
|
||||
@keys = ['hiddenThreads', 'hiddenPosts', 'lastReadPosts', 'yourPosts', 'watchedThreads']
|
||||
|
||||
constructor: (@key, sync, dontClean) ->
|
||||
@data = Conf[key]
|
||||
$.sync key, @onSync
|
||||
|
||||
@ -26,7 +26,7 @@ Main =
|
||||
Conf[parent] = obj
|
||||
return
|
||||
flatten null, Config
|
||||
for db in DataBoards
|
||||
for db in DataBoard.keys
|
||||
Conf[db] = boards: {}
|
||||
Conf['selectedArchives'] = {}
|
||||
Conf['archives'] = Redirect.archives
|
||||
|
||||
@ -169,7 +169,7 @@ Settings =
|
||||
data =
|
||||
version: g.VERSION
|
||||
date: now
|
||||
for db in DataBoards
|
||||
for db in DataBoard.keys
|
||||
Conf[db] = boards: {}
|
||||
# Make sure to export the most recent data.
|
||||
$.get Conf, (Conf) ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user