fix CatalogLinks race condition

This commit is contained in:
ccd0 2014-08-23 18:29:42 -07:00
parent 43b79a1134
commit e186c749ec
2 changed files with 6 additions and 3 deletions

View File

@ -204,6 +204,7 @@ Header =
return a
$.tn t
$.add list, nodes
$.ready CatalogLinks.initBoardList
toggleBoardList: ->
{bar} = Header

View File

@ -12,9 +12,11 @@ CatalogLinks =
el: el
order: 95
$.on d, '4chanXInitFinished', ->
# Set links on load.
CatalogLinks.set Conf['Header catalog links']
# Set links on load or custom board list change.
# Called by Header when both board lists (header and footer) are ready.
initBoardList: ->
return unless Conf['Catalog Links']
CatalogLinks.set Conf['Header catalog links']
toggle: ->
$.event 'CloseMenu'