Skip to content

Commit b77eca1

Browse files
committed
Fix parse error when generating node from yaml file
1 parent bc65f0c commit b77eca1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/swagger/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async function getSpec(src, data) {
2424
let response = await axios.get(src, requestOptions);
2525
spec = response.data;
2626
} else if (/\.yaml$/.test(src)) {
27-
spec = yamljs.load(util.skipBom(await fs.promises.readFile(src)));
27+
spec = yamljs.load(src);
2828
} else if (/\.json/.test(src)) {
2929
spec = JSON.parse(util.skipBom(await fs.promises.readFile(src)));
3030
} else {

0 commit comments

Comments
 (0)