babel-plugin-es5-array-autopolyfill
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -35,3 +35,7 @@ 'use strict'; | ||
CallExpression: function CallExpression(path) { | ||
var callee = path.node.callee; | ||
var property = path.get('callee.property').node; | ||
if (!t.isIdentifier(property) || replaceProperties.indexOf(property.name) < 0) { | ||
return; | ||
} | ||
var identifierPath = path.get("callee.object", true); | ||
@@ -48,8 +52,6 @@ | ||
var property = path.get('callee.property').node; | ||
if (t.isIdentifier(property) && replaceProperties.indexOf(property.name) >= 0) { | ||
usedMethods[property.name] = true; | ||
property.name = prefix + property.name; | ||
path.replaceWith(t.callExpression(property, [callee.object].concat(path.node.arguments))); | ||
} | ||
var callee = path.node.callee; | ||
usedMethods[property.name] = true; | ||
property.name = prefix + property.name; | ||
path.replaceWith(t.callExpression(property, [callee.object].concat(path.node.arguments))); | ||
} | ||
@@ -56,0 +58,0 @@ } |
{ | ||
"name": "babel-plugin-es5-array-autopolyfill", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
6424
116