test/dummy/node_modules/@babel/template/lib/literal.js in disco_app-0.18.0 vs test/dummy/node_modules/@babel/template/lib/literal.js in disco_app-0.18.1

- old
+ new

@@ -5,25 +5,23 @@ }); exports.default = literalTemplate; var _options = require("./options"); -var _parse = _interopRequireDefault(require("./parse")); +var _parse = require("./parse"); -var _populate = _interopRequireDefault(require("./populate")); +var _populate = require("./populate"); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function literalTemplate(formatter, tpl, opts) { const { metadata, names } = buildLiteralData(formatter, tpl, opts); return arg => { - const defaultReplacements = arg.reduce((acc, replacement, i) => { - acc[names[i]] = replacement; - return acc; - }, {}); + const defaultReplacements = {}; + arg.forEach((replacement, i) => { + defaultReplacements[names[i]] = replacement; + }); return arg => { const replacements = (0, _options.normalizeReplacements)(arg); if (replacements) { Object.keys(replacements).forEach(key => { \ No newline at end of file