diff --git a/lib/6to5/templates/tagged-template-literal.js b/lib/6to5/templates/tagged-template-literal.js index a1735f0fc7..5a3a997307 100644 --- a/lib/6to5/templates/tagged-template-literal.js +++ b/lib/6to5/templates/tagged-template-literal.js @@ -1,4 +1,6 @@ (function (strings, raw) { - return Object.freeze(Object.defineProperties(strings, { raw: { value: raw } })); + return Object.freeze(Object.defineProperties(strings, { + raw: { value: Object.freeze(raw) } + })); }); diff --git a/test/fixtures/transformation/es6-template-literals/tag/expected.js b/test/fixtures/transformation/es6-template-literals/tag/expected.js index 6d6de74206..c4b5cb6cbb 100644 --- a/test/fixtures/transformation/es6-template-literals/tag/expected.js +++ b/test/fixtures/transformation/es6-template-literals/tag/expected.js @@ -3,7 +3,7 @@ var _taggedTemplateLiteral = function (strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { - value: raw + value: Object.freeze(raw) } })); };