Recover as well as possible from data corruption caused by ad filter interaction with Tampermonkey. #2218
This commit is contained in:
parent
744f12dfda
commit
8bedd21c3a
@ -648,7 +648,12 @@ else
|
|||||||
|
|
||||||
$.getSync = (items, cb) ->
|
$.getSync = (items, cb) ->
|
||||||
for key of items when (val2 = $.getValue g.NAMESPACE + key)
|
for key of items when (val2 = $.getValue g.NAMESPACE + key)
|
||||||
items[key] = JSON.parse val2
|
try
|
||||||
|
items[key] = JSON.parse val2
|
||||||
|
catch err
|
||||||
|
# XXX https://github.com/ccd0/4chan-x/issues/2218
|
||||||
|
unless /^(?:undefined)*$/.test(val2)
|
||||||
|
throw err
|
||||||
cb items
|
cb items
|
||||||
|
|
||||||
$.set = $.oneItemSugar (items, cb) ->
|
$.set = $.oneItemSugar (items, cb) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user