mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-07 13:44:54 +03:00
js-yaml v4 functions are all safe
This commit is contained in:
parent
58b549763c
commit
b0ebdc0eaa
|
@ -43,7 +43,7 @@ export class ApiInfoModel implements OpenAPIInfo {
|
||||||
if (IS_BROWSER && window.Blob && window.URL && window.URL.createObjectURL) {
|
if (IS_BROWSER && window.Blob && window.URL && window.URL.createObjectURL) {
|
||||||
let specString: string;
|
let specString: string;
|
||||||
if (path.extname(this.options.downloadFileName) === '.yaml') {
|
if (path.extname(this.options.downloadFileName) === '.yaml') {
|
||||||
specString = yaml.safeDump(this.parser.spec);
|
specString = yaml.dump(this.parser.spec);
|
||||||
} else {
|
} else {
|
||||||
specString = JSON.stringify(this.parser.spec, null, 2);
|
specString = JSON.stringify(this.parser.spec, null, 2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user