@kezh/my-custom-js-converter 0.1.57 → 0.1.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/util/ast.js +4 -1
- package/package.json +1 -1
package/core/util/ast.js
CHANGED
|
@@ -343,7 +343,10 @@ function deleteModMethods(srcAst, mapContext) {
|
|
|
343
343
|
}
|
|
344
344
|
const methodName = path.node.property.name;
|
|
345
345
|
const split = methodName.split("__");
|
|
346
|
-
|
|
346
|
+
if (split.length > 1) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
const depName = split[split.length - 1];
|
|
347
350
|
if (deps.has(depName)) {
|
|
348
351
|
path.node.property.name = methodName.replace(`__${depName}`, "");
|
|
349
352
|
if (core_1.types.isThisExpression(path.node.object)) {
|