1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 00:35:26 +03:00

FirmwareCache: additional initialization check

This commit is contained in:
Kiripolszky Károly 2018-05-10 18:14:58 +02:00
parent 65e49e5896
commit e432d8656d

View file

@ -173,6 +173,10 @@ let FirmwareCache = (function () {
* Remove all cached data
*/
function destroy() {
if (!journalLoaded) {
console.warn("Cache journal not yet loaded");
return undefined;
}
let cacheKeys = [];
for (let key of journal.keys()) {
cacheKeys.push(withCachePrefix(key));