Tolerate failure of GM.listValues.

This commit is contained in:
ccd0 2019-04-24 04:50:57 -07:00
parent a2ed86e4f0
commit d5414fbdba

View File

@ -568,9 +568,11 @@ if GM?.deleteValue? and window.BroadcastChannel and not GM_addValueChangeListene
cb?()
$.clear = (cb) ->
GM.listValues().then (keys) ->
GM.listValues().then((keys) ->
$.delete keys.map((key) -> key.replace g.NAMESPACE, ''), cb
).catch( ->
$.delete Object.keys(Conf).concat(['previousversion', 'QR Size', 'QR.persona', 'hiddenPSA']), cb
)
else
unless GM_deleteValue?