I'm encountering a weird race issue when calling clearData
My call to clearData gets called, but results in a refresh of the current page (which is caused by the idb blocked handler)
onversionchange never gets called
My assumption is that because destroy() calls idb.close, the onversionchange handler is never called. but at the same time, the idb handle is not really "closed" yet when we call deleteDB.
My solution would be to switch the order of the calls, see PR
I'm encountering a weird race issue when calling
clearData
clearData
gets called, but results in a refresh of the current page (which is caused by the idb blocked handler)onversionchange
never gets calledMy assumption is that because
destroy()
callsidb.close
, theonversionchange
handler is never called. but at the same time, the idb handle is not really "closed" yet when we call deleteDB.My solution would be to switch the order of the calls, see PR