This commit is contained in:
Kovid Goyal 2016-05-02 17:46:20 +05:30
parent eeb8212f13
commit a238a7184d
2 changed files with 6 additions and 1 deletions

View File

@ -155,6 +155,9 @@ class DB:
req.onerror = def(event):
proceed(_('Failed to store book data ({0}) with error: {1}').format(name, get_error_details(event)))
def clear_mathjax(self, proceed):
self.idb.transaction(['mathjax'], 'readwrite').objectStore('mathjax').clear().onsuccess = proceed
def store_mathjax_file(self, name, xhr, proceed):
data = xhr.response
if not self.supports_blobs:

View File

@ -261,7 +261,9 @@ class ReadUI:
if mathjax_info.version is MATHJAX_VERSION:
return proceed()
print('Upgrading MathJax, previous version:', mathjax_info.version)
self.get_mathjax_manifest(mathjax_info, proceed)
self.db.clear_mathjax(def():
self.get_mathjax_manifest(mathjax_info, proceed)
)
)
def get_mathjax_manifest(self, mathjax_info, proceed):