Skip to content

Commit 7ac1cf8

Browse files
author
Sefi Krausz
committed
changes to axios target
1 parent 5c853ab commit 7ac1cf8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎src/targets/node/axios.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ module.exports = function (source, options) {
7878
if (includeFS) {
7979
code.unshift('const fs = require("fs");')
8080
}
81-
const formatedOptions = JSON.stringify(requestOptions).replace(/{/g, `{
81+
const formatedOptions = JSON.stringify(requestOptions)
82+
.replace(/{/g, `{
83+
`)
84+
.replace(/}/g, `
85+
}`)
86+
.replace(/,/g, `,
8287
`)
8388
code.push(`axios(${
8489
formatedOptions

0 commit comments

Comments
 (0)