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

This reverts commit 2d0a007d14e519fe60a849dd17068a0f3df79a28, reversing
changes made to e4d6d420415a0c290a321fb6c18ba5f19675b5c1.
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 { binding, oldName, newName } = this;
let { scope, path } = binding; let { scope, path } = binding;
let parentDeclar = path.find((path) => path.isDeclaration()); let parentDeclar = path.find((path) => path.isDeclaration() || path.isFunctionExpression());
if (parentDeclar) { if (parentDeclar) {
this.maybeConvertFromExportDeclaration(parentDeclar); this.maybeConvertFromExportDeclaration(parentDeclar);
} }