diff --git a/src/babel/transformation/templates/property-method-assignment-wrapper-generator.js b/src/babel/transformation/templates/property-method-assignment-wrapper-generator.js index ac47e5a639..34fce2882f 100644 --- a/src/babel/transformation/templates/property-method-assignment-wrapper-generator.js +++ b/src/babel/transformation/templates/property-method-assignment-wrapper-generator.js @@ -4,7 +4,7 @@ } FUNCTION_ID.toString = function () { - return FUNCTION_ID.toString(); + return FUNCTION_KEY.toString(); }; return FUNCTION_ID; diff --git a/src/babel/transformation/templates/property-method-assignment-wrapper.js b/src/babel/transformation/templates/property-method-assignment-wrapper.js index ecfac52c87..eeb8e5c7fd 100644 --- a/src/babel/transformation/templates/property-method-assignment-wrapper.js +++ b/src/babel/transformation/templates/property-method-assignment-wrapper.js @@ -4,7 +4,7 @@ } FUNCTION_ID.toString = function () { - return FUNCTION_ID.toString(); + return FUNCTION_KEY.toString(); } return FUNCTION_ID; diff --git a/test/core/fixtures/transformation/spec.function-name/assignment/expected.js b/test/core/fixtures/transformation/spec.function-name/assignment/expected.js index 1ff1e6a273..be772c66d0 100644 --- a/test/core/fixtures/transformation/spec.function-name/assignment/expected.js +++ b/test/core/fixtures/transformation/spec.function-name/assignment/expected.js @@ -6,7 +6,7 @@ var i = (function (_i) { } i.toString = function () { - return i.toString(); + return _i.toString(); }; return i; @@ -17,4 +17,4 @@ var i = (function (_i) { var j = function j() { var _ = 5; j = _.j; -}; \ No newline at end of file +}; diff --git a/test/core/fixtures/transformation/spec.function-name/object/expected.js b/test/core/fixtures/transformation/spec.function-name/object/expected.js index fd935fcd44..fcba6b1801 100644 --- a/test/core/fixtures/transformation/spec.function-name/object/expected.js +++ b/test/core/fixtures/transformation/spec.function-name/object/expected.js @@ -13,7 +13,7 @@ var obj = { } h.toString = function () { - return h.toString(); + return _h.toString(); }; return h; @@ -24,4 +24,4 @@ var obj = { m: function m() { doSmth(); } -}; \ No newline at end of file +}; diff --git a/test/core/fixtures/transformation/spec.function-name/own-bindings/expected.js b/test/core/fixtures/transformation/spec.function-name/own-bindings/expected.js index 06312d473d..6d4694125a 100644 --- a/test/core/fixtures/transformation/spec.function-name/own-bindings/expected.js +++ b/test/core/fixtures/transformation/spec.function-name/own-bindings/expected.js @@ -10,7 +10,7 @@ var f = (function (_f) { } f.toString = function () { - return f.toString(); + return _f.toString(); }; return f; @@ -23,9 +23,9 @@ var obj = { } f.toString = function () { - return f.toString(); + return _f2.toString(); }; return f; })(function (f) {}) -}; \ No newline at end of file +}; diff --git a/test/core/fixtures/transformation/spec.function-name/self-reference/expected.js b/test/core/fixtures/transformation/spec.function-name/self-reference/expected.js index f1251dd937..900ff0debc 100644 --- a/test/core/fixtures/transformation/spec.function-name/self-reference/expected.js +++ b/test/core/fixtures/transformation/spec.function-name/self-reference/expected.js @@ -6,10 +6,10 @@ var f = (function (_f) { } f.toString = function () { - return f.toString(); + return _f.toString(); }; return f; })(function () { console.log(f, g); -}); \ No newline at end of file +});