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:
parent
65e49e5896
commit
e432d8656d
1 changed files with 4 additions and 0 deletions
|
@ -173,6 +173,10 @@ let FirmwareCache = (function () {
|
||||||
* Remove all cached data
|
* Remove all cached data
|
||||||
*/
|
*/
|
||||||
function destroy() {
|
function destroy() {
|
||||||
|
if (!journalLoaded) {
|
||||||
|
console.warn("Cache journal not yet loaded");
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
let cacheKeys = [];
|
let cacheKeys = [];
|
||||||
for (let key of journal.keys()) {
|
for (let key of journal.keys()) {
|
||||||
cacheKeys.push(withCachePrefix(key));
|
cacheKeys.push(withCachePrefix(key));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue