diff --git a/src/targets/javascript/fetch.js b/src/targets/javascript/fetch.js index 3099d7cfa..1ac3ab829 100644 --- a/src/targets/javascript/fetch.js +++ b/src/targets/javascript/fetch.js @@ -65,6 +65,7 @@ module.exports = function (source, options) { code .push(`fetch("${source.fullUrl}", ${JSON.stringify(options, null, opts.indent)})`) + .push('.then(res => res.json())') .push('.then(response => {') .push(1, 'console.log(response);') .push('})')