1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 16:25:22 +03:00

Disable Schema validation for ChromeOS

This commit is contained in:
Miguel Angel Mulero Martinez 2019-11-04 12:46:14 +01:00
parent 0c00a80b8e
commit 918a989e72

View file

@ -111,6 +111,10 @@ TABS.vtx.initialize = function (callback) {
// Load schema
const urlVtxSchema = chrome.runtime.getURL(`resources/jsonschema/vtxconfig_schema-${vtxConfig.version}.json`);
if (GUI.Mode === GUI_Modes.ChromeApp) {
// FIXME the ChromeOs don't let us use a Schema Validator because almost all of them use eval, and/or use require
callback_valid();
} else {
fetch(urlVtxSchema)
.then(response => response.json())
.catch(error => console.error('Error fetching VTX Schema:', error))
@ -124,7 +128,9 @@ TABS.vtx.initialize = function (callback) {
console.log("Validation against schema result:", valid);
valid ? callback_valid() : callback_error();
});
}
);
}
}