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 return a
$.tn t $.tn t
$.add list, nodes $.add list, nodes
$.ready CatalogLinks.initBoardList
toggleBoardList: -> toggleBoardList: ->
{bar} = Header {bar} = Header

View File

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