mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 23:43:15 +01:00
using yaml CORE_SCHEMA instead of DEFAULT_SCHEMA (#3303)
Co-authored-by: Anusree Subash <anusree@usebruno.com>
This commit is contained in:
parent
3ef7df57e2
commit
a880e030eb
@ -17,7 +17,7 @@ const readFile = (files) => {
|
|||||||
} catch (jsonError) {
|
} catch (jsonError) {
|
||||||
// not a valid JSOn, try yaml
|
// not a valid JSOn, try yaml
|
||||||
try {
|
try {
|
||||||
const parsedData = jsyaml.load(e.target.result);
|
const parsedData = jsyaml.load(e.target.result, { schema: jsyaml.CORE_SCHEMA });
|
||||||
resolve(parsedData);
|
resolve(parsedData);
|
||||||
} catch (yamlError) {
|
} catch (yamlError) {
|
||||||
console.error('Error parsing the file :', jsonError, yamlError);
|
console.error('Error parsing the file :', jsonError, yamlError);
|
||||||
|
Loading…
Reference in New Issue
Block a user