Fix race condition (CatalogLinks.setLinks called from within Header.init).
This commit is contained in:
parent
676f35aa7f
commit
b3a99296fd
@ -25,7 +25,7 @@ CatalogLinks =
|
|||||||
name: 'Catalog Link Rewrite'
|
name: 'Catalog Link Rewrite'
|
||||||
cb: @node
|
cb: @node
|
||||||
|
|
||||||
if Conf['Catalog Links']
|
if (@enabled = Conf['Catalog Links'])
|
||||||
CatalogLinks.el = el = UI.checkbox 'Header catalog links', 'Catalog Links'
|
CatalogLinks.el = el = UI.checkbox 'Header catalog links', 'Catalog Links'
|
||||||
el.id = 'toggleCatalog'
|
el.id = 'toggleCatalog'
|
||||||
input = $ 'input', el
|
input = $ 'input', el
|
||||||
@ -55,7 +55,7 @@ CatalogLinks =
|
|||||||
|
|
||||||
# Also called by Header when board lists are loaded / generated.
|
# Also called by Header when board lists are loaded / generated.
|
||||||
setLinks: (list) ->
|
setLinks: (list) ->
|
||||||
return unless CatalogLinks.el and list
|
return unless (CatalogLinks.enabled ? Conf['Catalog Links']) and list
|
||||||
|
|
||||||
for a in $$('a:not([data-only])', list)
|
for a in $$('a:not([data-only])', list)
|
||||||
continue if (
|
continue if (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user