Filter and Redirect crashes seem related: missing values in the Conf object, only on Chrome: bug in the
extension storage API? Not seeing any databoard errors anymore. Zero `body > .desktop` elements, both on Chrome and Firefox, no clue what's going on.
This commit is contained in:
parent
b42ab994af
commit
d772180f0f
@ -5,21 +5,6 @@ Redirect =
|
|||||||
file: {}
|
file: {}
|
||||||
|
|
||||||
init: ->
|
init: ->
|
||||||
try
|
|
||||||
Conf['archives'].length
|
|
||||||
catch err
|
|
||||||
# XXX I get obscure reports of:
|
|
||||||
# "Redirect" initialization crashed. TypeError: Cannot read property 'length' of undefined
|
|
||||||
# comming from here.
|
|
||||||
Main.logError
|
|
||||||
message: "XXX Conf['archives'].length still failing"
|
|
||||||
error: new Error """
|
|
||||||
Conf['archives'] === #{JSON.stringify Conf['archives']}
|
|
||||||
"""
|
|
||||||
Conf['archives'] = Redirect.archives
|
|
||||||
$.delete ['archives', 'lastarchivecheck']
|
|
||||||
Redirect.update()
|
|
||||||
|
|
||||||
for boardID, data of Conf['selectedArchives']
|
for boardID, data of Conf['selectedArchives']
|
||||||
for type, uid of data
|
for type, uid of data
|
||||||
for archive in Conf['archives']
|
for archive in Conf['archives']
|
||||||
|
|||||||
@ -5,16 +5,6 @@ Filter =
|
|||||||
|
|
||||||
for key of Config.filter
|
for key of Config.filter
|
||||||
@filters[key] = []
|
@filters[key] = []
|
||||||
if Conf[key] is undefined
|
|
||||||
# XXX hopefully tmp fix for the rare people getting this mysterious error:
|
|
||||||
# "Filter" initialization crashed. TypeError: Cannot call method 'split' of undefined
|
|
||||||
Main.logError
|
|
||||||
message: 'XXX some filters are still undefined'
|
|
||||||
error: new Error """
|
|
||||||
Conf[#{key}] === undefined
|
|
||||||
"""
|
|
||||||
$.delete key
|
|
||||||
continue
|
|
||||||
for filter in Conf[key].split '\n'
|
for filter in Conf[key].split '\n'
|
||||||
continue if filter[0] is '#'
|
continue if filter[0] is '#'
|
||||||
|
|
||||||
|
|||||||
@ -57,18 +57,7 @@ class DataBoard
|
|||||||
|
|
||||||
clean: ->
|
clean: ->
|
||||||
for boardID, val of @data.boards
|
for boardID, val of @data.boards
|
||||||
# XXX tmp fix for users that had the `null`
|
@deleteIfEmpty {boardID}
|
||||||
# value for a board with the Unread features:
|
|
||||||
if typeof @data.boards[boardID] isnt 'object'
|
|
||||||
Main.logError
|
|
||||||
message: 'XXX weird DataBoard values'
|
|
||||||
error: new Error """
|
|
||||||
@key === #{@key}
|
|
||||||
@data.boards[#{boardID}] === #{@data.boards[boardID]}
|
|
||||||
"""
|
|
||||||
delete @data.boards[boardID]
|
|
||||||
else
|
|
||||||
@deleteIfEmpty {boardID}
|
|
||||||
|
|
||||||
now = Date.now()
|
now = Date.now()
|
||||||
if (@data.lastChecked or 0) < now - 2 * $.HOUR
|
if (@data.lastChecked or 0) < now - 2 * $.HOUR
|
||||||
|
|||||||
@ -100,12 +100,6 @@ Header =
|
|||||||
innerHTML: '<a href=javascript:;> - </a>'
|
innerHTML: '<a href=javascript:;> - </a>'
|
||||||
$.on btn, 'click', Header.toggleBoardList
|
$.on btn, 'click', Header.toggleBoardList
|
||||||
$.add fullBoardList, btn
|
$.add fullBoardList, btn
|
||||||
else
|
|
||||||
Main.logError
|
|
||||||
message: "Header crash: nav is null"
|
|
||||||
error: new Error """
|
|
||||||
#{$$('body > .desktop').map((el) -> el.id).join ','}
|
|
||||||
"""
|
|
||||||
|
|
||||||
Header.setCustomNav Conf['Custom Board Navigation']
|
Header.setCustomNav Conf['Custom Board Navigation']
|
||||||
Header.generateBoardList Conf['boardnav']
|
Header.generateBoardList Conf['boardnav']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user