Revert "Merge pull request #3433 from loganfsmyth/bail-out-rename"

This reverts commit 2d0a007d14, reversing
changes made to e4d6d42041.
This commit is contained in:
Logan Smyth
2016-04-08 09:09:48 -07:00
parent b0d27142e8
commit c3ccddaaaf
4 changed files with 1 additions and 23 deletions

View File

@@ -1,5 +0,0 @@
export default (onClick) => ({
onClick: function(){
onClick(text);
},
});

View File

@@ -1,13 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (_onClick) {
return {
onClick: function onClick() {
_onClick(text);
}
};
};

View File

@@ -1,4 +0,0 @@
{
"presets": ["es2015"],
"plugins": ["external-helpers"]
}

View File

@@ -105,7 +105,7 @@ export default class Renamer {
let { binding, oldName, newName } = this;
let { scope, path } = binding;
let parentDeclar = path.find((path) => path.isDeclaration());
let parentDeclar = path.find((path) => path.isDeclaration() || path.isFunctionExpression());
if (parentDeclar) {
this.maybeConvertFromExportDeclaration(parentDeclar);
}