mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 04:45:20 +03:00
Fix and add check for chrome.runtime.lastError
This commit is contained in:
parent
0f8a2911d9
commit
431aa6bac8
13 changed files with 83 additions and 121 deletions
|
@ -216,8 +216,7 @@ function configuration_backup(callback) {
|
|||
|
||||
// create or load the file
|
||||
chrome.fileSystem.chooseEntry({type: 'saveFile', suggestedName: filename, accepts: accepts}, function (fileEntry) {
|
||||
if (chrome.runtime.lastError) {
|
||||
console.error(chrome.runtime.lastError.message);
|
||||
if (checkChromeRuntimeError()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -288,8 +287,7 @@ function configuration_restore(callback) {
|
|||
|
||||
// load up the file
|
||||
chrome.fileSystem.chooseEntry({type: 'openFile', accepts: accepts}, function (fileEntry) {
|
||||
if (chrome.runtime.lastError) {
|
||||
console.error(chrome.runtime.lastError.message);
|
||||
if (checkChromeRuntimeError()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue